avansc wrote:jesus, what happened do atoi, itoa, atof ... etc... see this is why you young people need to learn some C manners.
"warning C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details."
This function is deprecated, I already tried that and it worked but the correct way to do it is to use a std::string.
avansc your getting to old!
lolz, thats just a compiler warning, nothing serious. i doubt that you will trite code that will crash if you use it.
again, you compiled with a C++ compiler, try using something good like gcc.
i might be getting long in the tooth.. ;(
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
avansc wrote:jesus, what happened do atoi, itoa, atof ... etc... see this is why you young people need to learn some C manners.
Yeah, that's what I was thinking when I saw this topic. That's why I didn't respond until after the solution had already been presented, because I don't know how the hell to do some of the good ol' fashioned C things with C++ whore strings.
avansc wrote:jesus, what happened do atoi, itoa, atof ... etc... see this is why you young people need to learn some C manners.
"warning C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details."
This function is deprecated, I already tried that and it worked but the correct way to do it is to use a std::string.
avansc your getting to old!
lolz, thats just a compiler warning, nothing serious. i doubt that you will trite code that will crash if you use it.
again, you compiled with a C++ compiler, try using something good like gcc.
i might be getting long in the tooth.. ;(
Yeah, Microsoft has new versions for all of the oldschool C functions that handle exceptions and stuff like that. I still recommend the standard C stuff...
trufun202 wrote:In college, we weren't allowed to use strings - even if we wrote our own string class... It was char arrays all the way - but, it was good experience.
How long ago was this?
This is the internet, men are men, women are men and children are the FBI.
avansc wrote:jesus, what happened do atoi, itoa, atof ... etc... see this is why you young people need to learn some C manners.
"warning C4996: 'itoa': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _itoa. See online help for details."
This function is deprecated, I already tried that and it worked but the correct way to do it is to use a std::string.
avansc your getting to old!
lolz, thats just a compiler warning, nothing serious. i doubt that you will trite code that will crash if you use it.
again, you compiled with a C++ compiler, try using something good like gcc.
i might be getting long in the tooth.. ;(
Yeah, Microsoft has new versions for all of the oldschool C functions that handle exceptions and stuff like that. I still recommend the standard C stuff...
Well I'm a perfectionist, I spent 2 months rewriting my code so I could remove a 64Kb memory leak.
This is the internet, men are men, women are men and children are the FBI.
avansc wrote:jesus, what happened do atoi, itoa, atof ... etc... see this is why you young people need to learn some C manners.
Yeah, that's what I was thinking when I saw this topic. That's why I didn't respond until after the solution had already been presented, because I don't know how the hell to do some of the good ol' fashioned C things with C++ whore strings.
In this case, I'd use itoa(). Although iirc it's not standard [but atoi is]. C++ doesn't really have better conversions...
trufun202 wrote:In college, we weren't allowed to use strings - even if we wrote our own string class... It was char arrays all the way - but, it was good experience.
Yeah, I have had classes where we weren't allowed to use strings either. Honestly though, I think the character array manipulation was good for me. Too many C++ programmers don't know how to handle C style character arrays...
GyroVorbis wrote:Yeah, I have had classes where we weren't allowed to use strings either. Honestly though, I think the character array manipulation was good for me. Too many C++ programmers don't know how to handle C style character arrays...
I know how to do that and then some for instance I used to manage my own arrays and didn't even know about std::vector. You have no idea how complex that made stuff, I learned a lot from it though and I agree that itoa() is much more logical but I've been trying to do absolutely everything by the book. it's worked out well though most of the stuff I just find retarded, I'm hoping to use this as an example of my work in the future.
This is the internet, men are men, women are men and children are the FBI.
GyroVorbis wrote:Yeah, I have had classes where we weren't allowed to use strings either. Honestly though, I think the character array manipulation was good for me. Too many C++ programmers don't know how to handle C style character arrays...
I know how to do that and then some for instance I used to manage my own arrays and didn't even know about std::vector. You have no idea how complex that made stuff, I learned a lot from it though and I agree that itoa() is much more logical but I've been trying to do absolutely everything by the book. it's worked out well though most of the stuff I just find retarded, I'm hoping to use this as an example of my work in the future.
i would suggest not to use std::vector, especially if you are so adamant on staying efficient.
or anything C++ gives you that makes something people think is complicated into something thats easy.
if you dont know the machanics of something C++ is lettign you use you will have a shit hoard time trying to make something effiecient, becauyse you wont know where your code is being inefficient.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
The standard template library in C++ is actually pretty damn huge when it comes to executable file size. I'm not saying whether I recommend you go one way or another, but you mentioned efficiency, so I thought that I would bring this up.