Anonymous
Mkstr is make string macro may be u have linking problem of macro file!
Anonymous
"Hello c++"
Anonymous
itsmanjeet
hey, anybody used struct mystruct { vector<unique_ptr<variant<...>>> values; } before i am getting lot of errors, saying static assertion failed: result type must be constructable from value type of input range and i have no idea about it
Mickey🕷
what error are you getting?
<stdin>:6:13: error: use of undeclared identifier 'x' cout << MKSTR (HELLO C++) << endl; ^ <stdin>:4:17: note: expanded from macro 'MKSTR' #define MKSTR ( x ) #x ^ 1 error generated.
Mickey🕷
by any chance do you have a space between MKSTR and (x) ?
Ow yah. That's where the problem was. Now it's compiling without an error. Thanks @cd6cdh and @coffee_coffee_tea_coffee
mito
bool func(int x) { if (x==2) return true; else return false; } ------------------------ bool func(int x) { if (x==2) return true; return false; } Is there any difference between these two other than the structure?
Hanz
WHY
Hanz
yeah
Hanz
tnx, how can I see the assembly code?
https://stackoverflow.com/questions/840321/how-can-i-see-the-assembly-code-for-a-c-program
Hanz
GNU g++
Hanz
yw
Anonymous
tnx, how can I see the assembly code?
Compiler Explorer is good, too. https://godbolt.org/
Hanz
i also ever saw one online compiler which could compile to high level source only 🤔 I forgot what is it
Anonymous
mito
Compiler Explorer is good, too. https://godbolt.org/
it show's a red highlighting in one line, what does that mean ?
Loner〽💻
tnx, how can I see the assembly code?
compile using command: gcc -s yourcode.c -o yourassembly.s
Hanz
That's short 👍
Anonymous
it show's a red highlighting in one line, what does that mean ?
Whats red highlight? If you mean the colorful highlight, the cpp code of the same color corresponds the assembly code of the same color.
FOFANA
Hello please help 👆👆👆
Anonymous
I don't usually send code for someone else to see and correct it, because I try to figure it out by myself but I have been trying to debug this one for hours now, it's simple but somehow it's not working. My code: https://pastebin.com/kfb1yMFB Question: https://www.spoj.com/problems/MIXTURES/ If anyone can help me out, it'd be great. Thanks in advance.
Anonymous
Yeah it seems right. Let me check again.
Thanks. I have tried a lot, I really don't know why it ain't working
Anonymous
Plz i need great help about c++
Anonymous
Im new In learn c++
Anonymous
Fine
Josiah
Hello am need help in order to learn more about c++ programming
Anonymous
Anonymous
?
Anonymous
Can anyone share the best website for STL
please learn some keywords of algorithms. and search features with google
Josiah
What about for starters
Anonymous
you can also learn some scripting language to see what problems are common
Anonymous
SQL?
php nodejs python .. etc
Anonymous
👍
Alberto
This code gives me the error: conflicting types for 'readMatrix' in line 31
Alberto
https://pastebin.ubuntu.com/p/YQ82Zzrfmq/
Alberto
Why?
Alberto
In C
Anonymous
I don't usually send code for someone else to see and correct it, because I try to figure it out by myself but I have been trying to debug this one for hours now, it's simple but somehow it's not working. My code: https://pastebin.com/kfb1yMFB Question: https://www.spoj.com/problems/MIXTURES/ If anyone can help me out, it'd be great. Thanks in advance.
You figured out the issue with your code? I just changed 2 lines and it worked fine and the answer was also accepted. Previously I was just trying to understand your code on my phone and your macros kept me running in circles. But once I got home, I just loaded it on my system, changed 2 lines and submitted the solution on SPOJ to see if it was fine. It was.
Anonymous
This code gives me the error: conflicting types for 'readMatrix' in line 31
Look at line 15 where you have declared that function. that declaration is different from the definition.
Anonymous
I couldn't figure it out. :/
Anonymous
I changed the line using scanf to while(cin >>n) I then replaced the call to memset with the 2 for loops below it. The problem is that memset interprets the 2nd parameter (int)as an unsigned char. So the value -1 is interpreted as 255.
Anonymous
I used the nested loops for the initialisation.
Anonymous
Hold up At first I did it without memset and it wasn't working either :0
I just submitted the solution and it was accepted. Not sure why yours is getting rejected then. Check out ID = 28128919 in the submitted solutions
Anonymous
Given the following numbers (23, 45, 2, 6, 56, 7, 8, 49) write a program which will store these numbers into an array and display them in ascending order. Plz help me
Teatro
Hello everyone Why i can't copy strcpy(matriz[fila] [columna] , pieza) "matriz" is char type and "pieza" is a variable that i saved a character before (char type too) I get this message: Invalid conversion from 'char' to 'char*' Help me please :(
Teatro
https://www.man7.org/linux/man-pages/man3/strcpy.3.html
Ohh must to be constant not variable Thanks bro i will have to find out other way to do that 😢
Anonymous
Ohh must to be constant not variable Thanks bro i will have to find out other way to do that 😢
Noooooo. That is not the issue. strcpy is used to copy strings (null terminated) and not a char.
Teatro
Noooooo. That is not the issue. strcpy is used to copy strings (null terminated) and not a char.
I got it, the solution was this: pieza=getch() and then i saved the variable like this matriz[fila][columna]=pieza 😂 Anyway thanks so much for answer bro
Hermann
is possible compare values between two std::map?
Anonymous
is possible compare values between two std::map?
Yeah, I was confused about this some days back Simply used "==" to compare.
Anonymous
Worked like a charm.
Hermann
https://pastebin.com/72FFAEdE