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
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
C++ nightmare
Honk if you love Jesus, text if you want to meet Him!
-
- Posts: 96
- Joined: Fri Jul 16, 2004 1:04 pm
C++ nightmare
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
Archived topic from Iceteks, old topic ID:3167, old post ID:25873
C++ nightmare
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
42 ERRORS
WHERE?!!!! LOL
Archived topic from Iceteks, old topic ID:3167, old post ID:25875
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
C++ nightmare
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
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
Honk if you love Jesus, text if you want to meet Him!
C++ nightmare
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
Archived topic from Iceteks, old topic ID:3167, old post ID:25921
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
C++ nightmare
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
Archived topic from Iceteks, old topic ID:3167, old post ID:25922
Honk if you love Jesus, text if you want to meet Him!
C++ nightmare
Why not just read into a std::string?
Archived topic from Iceteks, old topic ID:3167, old post ID:25997
Archived topic from Iceteks, old topic ID:3167, old post ID:25997
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
C++ nightmare
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
Archived topic from Iceteks, old topic ID:3167, old post ID:26039
Honk if you love Jesus, text if you want to meet Him!
C++ nightmare
Get used to other functions, and when you need char-array strings, just use the c_str member function of the std::string class.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)
Archived topic from Iceteks, old topic ID:3167, old post ID:26046
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
C++ nightmare
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
Archived topic from Iceteks, old topic ID:3167, old post ID:26047
Honk if you love Jesus, text if you want to meet Him!