No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I am trying to read a file from an offset till end of file: int i,sizeb=210; char *buffer; //[1024]; FILE *f; f = fopen("myfile", "rb"); printf("Reading file.\n"); fseek(f, sizeb, SEEK_SET); long s = ftell(f); //rewind(f); fread(buffer, s, 1, f); fclose(f); But I never get the right result. Also when I … |
|
Hi, So I have a very simple server/client program using winsock. In C++. Using MingW as a compiler. This is the code part which does the connecting: [CODE]for(;;) { if(Connect = accept(Listen, (SOCKADDR*)&Server, &size)) { std::cout<<"\nConnection was reached"; } }[/CODE] How can I send and receive simple text from server … |
|
Hi, How can I add the values of an array to a char variable? Without using "strcat" btw. [CODE]char table[5],message; t[0] = "h"; t[1] = "e"; t[2] = "l"; t[3] = "l"; t[4] = "o";[/CODE] Than end up with "message = "hello""? Thanks. |