_itoa_s, strcpy_s, strcat_s. What are these doing exactly

Started by
11 comments, last by Tim Lawton 11 years, 4 months ago
Oh, please ignore my comment. I thought we were talking about strcat(). I need some rest. ;)
Advertisement

Oh, please ignore my comment. I thought we were talking about strcat(). I need some rest. ;)


lol, I know that feeling. biggrin.png

As a side note:

[source lang="cpp"]_itoa_s(fps, tempS, 10);
strcpy_s(fpsS, "FPS: ");
strcat_s(fpsS, tempS);
[/source]

Could be:
[source lang="cpp"]sprintf_s(fpsS, "FPS: %i", tempS);[/source]
If you want to use C style string handling.
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

[quote name='Xuchilbara' timestamp='1354213223' post='5005387']
Now the application isn't breaking/crashing at this point, it's breaking at another method called "UpdateSentence" which you can see in the screenshot here:

Then why don’t you show the code for UpdateSentence()?

Also, sentence3 is garbage when it is passed to UpdateSentence(). I assume it is a member of the Text class.
Naming conventions such as m_ would go a long way to help people realize from where variables are coming.
It needs to be initialized—this has nothing to do with the functions listed in the topic.


L. Spiro
[/quote]

Ah thats done it, it wasn't initializing correctly and going straight to garbage, it is working now thanks alot everyone! :)

Also in essence, _itoa_s, strcpy_s, strcat_s, wasn't even the problem, sorry for being misleading :/

This topic is closed to new replies.

Advertisement