Harvey
Thanks a lot 😃🤩
😂😂😂😂
Anonymous
How to put numbers taken as input in one line separated by a space into an array in c?
Anonymous
Ok
Anonymous
Thanks. How can i remove whitespace from the end while printing
Anonymous
Hey folks
Anonymous
I will release the source code of my programs for you here guys
Anonymous
I am focusing on data structures
Anonymous
I made a poker game(not complete)
Anonymous
But it uses stacks
Anonymous
It divides a deck into 13 stacks randomly while the deck is not empty
Anonymous
Then it reassembles into a shuffled deck
Anonymous
And take the top five of the deck
Anonymous
I want to program something with graphics. Anyone has a suggestion?
Vlad
Thanks. How can i remove whitespace from the end while printing
next strtok will point to that whitespace go figure
Vlad
You may just strncopy to another string I guess
Vlad
C
And what kind of graphics are you planning to use?
Anonymous
Maybe something to make some simple games
Vlad
I guess SDL2 will do
Anonymous
I guess SDL2 will do
Is it a library?
Anonymous
Yes
I will make some research thanks.
Anonymous
Anyone here thought about making a repository in common for the group?
Anonymous
Like github or bitbucket?
Anonymous
Hello. Say I have 3 files: setup.c, bootloader.c and firmware.c And both the bootloader and firmware call functions from setup. How do we achieve something like this: #if CONTROL_COMING_FROM_BOOTLOADER #include "bootloader_ui.h" #include "lvgl/lvgl.h" #else #include "firmware/firmware_ui.h" #include "firmware/lvgl_firmware/lvgl.h" #endif
olli
Hello. Say I have 3 files: setup.c, bootloader.c and firmware.c And both the bootloader and firmware call functions from setup. How do we achieve something like this: #if CONTROL_COMING_FROM_BOOTLOADER #include "bootloader_ui.h" #include "lvgl/lvgl.h" #else #include "firmware/firmware_ui.h" #include "firmware/lvgl_firmware/lvgl.h" #endif
if you have a setup.h you can do something like this. —————————————————- setup.h #ifdef BOOTLOADER_SETUP #include "bootloader_ui.h" #include "lvgl/lvgl.h" #else #include "firmware/firmware_ui.h" #include "firmware/lvgl_firmware/lvgl.h" #endif —————————————————- bootloader.c #define BOOTLOADER_SETUP #include "setup.h" #undef BOOTLOADER_SETUP —————————————————- firmware.c #define FIRMWARE_SETUP #include "setup.h" #undef FIRMWARE_SETUP Otherwise providing more information would be helpful. Why not include the first two headers in bootloader.c and the second set in firmware.c ?
Arjun
Is there Anyone can solve advanced coding question?
Roshan
Arjun
Create a web application with an option to upload a CSV file of 1 lakh or more records, where the application should read the records, process it, and push to the database table. The CSV file will have a header row that denotes the database table column names and rows which represent the values of the database table. After the upload of the CSV file, only the database table should be created dynamically based on the header names of the CSV file and the insert of row values should be carried out later. In case if there are any header named as “password”, the value should be encrypted dynamically and saved in the database.
SALIHU
/get imhacker
SALIHU
I was just trying to get a book on it🙁
SALIHU
Question, I have installed VS code but I just can't compile c++ codes
SALIHU
Plus, I have installed the additional tools needed for c++, I just don't get it
SALIHU
Anonymous
We can't see what you see
Anonymous
It's a editor not ide...
SALIHU
We can't see what you see
What I mean is, I type codes but it doesn't compile
Anonymous
Just config the path for c++ compiler and set keybind
SALIHU
It's a editor not ide...
😥 so I just wasted data
SALIHU
Anonymous
Yeah I don't understand this
Google config vs code for compiling c++. It's ez and lot of people answered
Anonymous
Anonymous
guys is it okay to ask logic based c questions?
Anonymous
Int main(void) { Int a=9; If(a=5) printf("a is five\t"); else printf("a is not five\t"); printf("value of a is %d",a); return 0; }
Anonymous
I thought else statement is printed but during IDE check if statement is executed
Anonymous
can somebody explain where im missing the logic
olli
can somebody explain where im missing the logic
if(a=5) ^ in your condition you assign 5 to a, which is clearly not 0 and hence the condition evaluates to true. you probably want to use a == 5?
olli
Assigns return true one equal sign is assign Two equal sign are compare
for completeness sake, assigning 0 evaluates to false
Roshan
Hey! Does anyone know how to use variant in VS?
Roshan
I've written, variant<string, int> data; data = "Roshan"; data = 5; cout << get<string>(data)
Roshan
It's not working...
olli
It's not working...
what do you mean it's not working?
Roshan
what do you mean it's not working?
Can I share a screenshot in DM?
Anonymous
for completeness sake, assigning 0 evaluates to false
i will surely note this point :) thanks admin for solving the question
Roshan
Does anyone know about the <=> operator in c++20?
Roshan
What?!
Igor🇺🇦
What?!
You asked "Does anyone know about the <=> operator in c++20?" That's a meta question
Roshan
Hey everyone! Can anyone do a review of my Fibonacci recursion code?
Roshan
pastebin.com/DLBqAxFB
Anonymous
Which is the best free C++ IDE?? Not a text editor like Atom, a proper IDE for C++?
Anonymous
Thank You Very Much
Roshan
pastebin.com/DLBqAxFB
Please review...
ErreKappa1
Please review...
use more descriptive variable names, comment the code also it seems to work, so np
ErreKappa1
use more descriptive variable names, comment the code also it seems to work, so np
Well, actually you have some comments, but mby some more
Roshan
use more descriptive variable names, comment the code also it seems to work, so np
Hey, I thought no one was interested so I didn't change the variable names... But is my algorithm correct?
ErreKappa1
Hey, I thought no one was interested so I didn't change the variable names... But is my algorithm correct?
Also, using namespace std; is considered a bad practice Lemme check tho, seems fine