Page 1 of 1
C++ nightmare
Posted: Sat Mar 12, 2005 11:15 pm
by Red Squirrel
This is why it's best to stick to one language at a time.
"why won't this dang thing compile!"
Archived topic from Iceteks, old topic ID:3167, old post ID:25872
C++ nightmare
Posted: Sat Mar 12, 2005 11:35 pm
by Cold Drink
So you too are tainted
Try and purge all that VB from your mind
Archived topic from Iceteks, old topic ID:3167, old post ID:25873
C++ nightmare
Posted: Sun Mar 13, 2005 12:42 am
by Death
O M G. Imagine trying to debug that? I can just see it now:
42 ERRORS
WHERE?!!!! LOL
Archived topic from Iceteks, old topic ID:3167, old post ID:25875
C++ nightmare
Posted: Sun Mar 13, 2005 1:00 am
by Red Squirrel
Actually I'm trying to debug it now but a different issue, it compiles but is ingoring some characters when reading a file.
Been trying to debug it for at least an hour... must go to bed... must debug... ahhhhhhhhhhhhh.
Once this program is complete I'll be able to keep a real time status of sympatico's downtime.
Archived topic from Iceteks, old topic ID:3167, old post ID:25876
C++ nightmare
Posted: Mon Mar 14, 2005 5:28 pm
by wtd
And you're using char arrays with C++. That's just asking for buffer overflows.
Archived topic from Iceteks, old topic ID:3167, old post ID:25921
C++ nightmare
Posted: Mon Mar 14, 2005 6:36 pm
by Red Squirrel
It's the only way though in this case, since I have to read from files and store it in chars. As long as a host in the file does not get bigger than 10000 bytes I should be fine.
Archived topic from Iceteks, old topic ID:3167, old post ID:25922
C++ nightmare
Posted: Thu Mar 17, 2005 11:13 pm
by wtd
Why not just read into a std::string?
Archived topic from Iceteks, old topic ID:3167, old post ID:25997
C++ nightmare
Posted: Sat Mar 19, 2005 4:00 pm
by Red Squirrel
I would but most functions I'm used to need chars. Like nearly all string handling functions. or sockets for example, when you specify the host, it needs a char. Though I wish C++ was like php, where you can pass anything and it works, no data types, and no limits. I can store the whole US, Canada and Europe constititions in a single variable if I wanted to.
(that's assuming the server has the memory/swap space)
Archived topic from Iceteks, old topic ID:3167, old post ID:26039
C++ nightmare
Posted: Sat Mar 19, 2005 6:56 pm
by wtd
Red Squirrel wrote: I would but most functions I'm used to need chars. Like nearly all string handling functions. or sockets for example, when you specify the host, it needs a char. Though I wish C++ was like php, where you can pass anything and it works, no data types, and no limits. I can store the whole US, Canada and Europe constititions in a single variable if I wanted to.
(that's assuming the server has the memory/swap space)
Get used to other functions, and when you need char-array strings, just use the c_str member function of the std::string class.
Archived topic from Iceteks, old topic ID:3167, old post ID:26046
C++ nightmare
Posted: Sat Mar 19, 2005 6:59 pm
by Red Squirrel
I'll have to look into that, anything to avoid buffer overflows is good. Not sure where to start though, got any tutorials that would help? Since this is basically like learning a new language as all the functions are different.
Archived topic from Iceteks, old topic ID:3167, old post ID:26047