Because it's an array not a C++ string. http://www.lysator.liu.se/c/c-faq/c-2.htmlIt works. Thanks for your help.
But I'm still wondering why we can't assign strings like that in the function?
It works. Thanks for your help.
But I'm still wondering why we can't assign strings like that in the function?
The basic problem is that when you created this global variable st, you created as an array of structures that is located at a specific place in memory that was allocated for it.It works. Thanks for your help.
But I'm still wondering why we can't assign strings like that in the function?
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
B | What's wrong with my discharging circuit? | Homework Help | 6 | |
what's wrong with my code | Programming & Languages | 4 | ||
what's wrong with this code and why PC goes up by 2? | Microcontrollers | 1 | ||
Y | what's wrong with code? | Homework Help | 0 | |
M | what's the wrong with my code? | Programming & Languages | 10 |