Try using g++ which is the C++ compiler. gcc is the C compiler.
Type: Posts; User: John_
Try using g++ which is the C++ compiler. gcc is the C compiler.
But the server can send data in chunks, for example messages from several users at a time may be sent from the server in one go. You will receive these messages all together as you know which is why...
Thank you for your code example.
I am curious, I don't see where you save any data which does not end with \r\n and append the new data you receive onto the end of it. How come you didn't choose...
I just realised that ping timeout checking code wont work. Because it will just keep waiting for data at recv(), so it would need an extra thread I guess which checks the time and uses a global...
Hello everybody :)
A long time ago I started a project called RicBot http://cboard.cprogramming.com/showthread.php?t=75223
Which I just left and didn't bother with anymore, I decided I would go...
std::cout << '\a' << endl;
That should give a beeping sound.
Thank you :)
How does strcpy() change what is at str though, I had people explaining it to me on IRC before but I still don't really understand it.
I don't see why strcpy(param, "World!");
is different from...
I don't think you need to prototype WINAPI WinMain() because like main() it is self-prototyping.
If you add #pragma comment(linker,"/subsystem:windows")
Under your includes for your header files,...
if (ansr == 'Y' || 'y')
Should be
if (ansr == 'Y' || ansr == 'y')
A lot of people say they should be inside brackets though for better readability like below but it is personal...
You store the characters in a char array like you did. But when you want to access a certain part of the array you need to use a number like MyArray[7]
So you need numbers. I could give you more...
I'd look up the functions rand() and srand(), you can use them with the modulus operator to (pseudo-)randomly generate a number only between 0 and 35.
Oh yea I forgot the extra \ for an esacape character in my example. And I also messed up the code tags hehe. I'll leave my original reply as is for consistency, you guys have given the correct answer...
[CODE]if((fp = fopen("C:\hello.txt, "w")) != NULL)
You only have the 1 " which would be causing problems. Use 2 and put whatever directory you want to write/read a file in, inside them like.
...
Thank you. :)
I am just asking why it outputs 4, hopefully in laymens terms so I can understand it ;)
Sorry but just to clarify, it is assuming the size of it because it does not know? I just want to make sure I understand :)
#include <iostream>
using namespace std;
int main(){
#include <iostream>
using namespace std;
int main(){
char* MyVar;
cout << sizeof(MyVar) << endl;
sprintf (cmd, "command goes here \"%s\"",x);
I'm not sure what you prefer teacher or lecturer.
I am wondering when somebody hands in there programming homework, do you just mark it to see if it is correct. Do you ask them questions about why...
Changes:
This version has multithreading, it is more practical for the Translate function and google search function.
Also if the translated text is above 300 bytes it truncates it to 300 bytes....
Out of curiosity, which book?
I have added a translation feature which uses bablefish.
This code is attached.
I really don't believe this.
I thought the .xls file he uploaded was the csv file but just renamed because the forum didn't accept that attachment type. It is the reason I asked him to post the...
Sorry if my questions seem pointless, the reason I am asking them is to try and understand the code better and see if something could be causing a problem. The reason I thought the SIZE was the...