Thanks Quzah,
... I'm not sure what happened with the top code box (I assume you're talking about the fact that it scrolls), I guess I shouldn't have used the indent tag inside of a code tag......
Type: Posts; User: aosmith
Thanks Quzah,
... I'm not sure what happened with the top code box (I assume you're talking about the fact that it scrolls), I guess I shouldn't have used the indent tag inside of a code tag......
put your code in a for loop like this:
for(;;)
{
//input, output etc.
}
Just a random question about static structs
for example:
static struct info
{
double number;
};
wow so fast...
MrAmazing and Vart - Thanks for the responses.
I caught the sprintf while debugging:
sprintf(request, "GET %s HTTP/1.0\r\nHOST:%s \r\n", &(*argv[1]) + (tok - &(*argv[1])), host);
That...
From my knowledge of HTTP sending a get request via HTTP with c (I'm only worried about get) should just be sending a packet containing something like GET <filename> HTTP/1.0 ... I've been trying to...
Here's something I wrote for a class a while back:
Client:
#include "userPanel.h"
int main (int argc, const char * argv[]) {
if (argc < 3)
I know there's only one main(), I switched between Mac and Windows in the middle (slightly different file names)
Includes should look like this:
main.cpp(whatever file contains main()):...
(switched to mac in the middle)
main.cpp:
#include <iostream>
#include "Book.h"
#include "ISBN.h"
Thanks for the advice, added inclusion gaurds
now it looks something like this:
main --> Book.h --> Book.cpp
but now all the elements in the .cpp are not declared and/or are invalid... Did I...
How do you guys suggest I rearrange includes? I'm working on it right now but without much luck... TIA
I thought that looked weird (it's the way VS setup)... and the ISBN is only 11 because the check (last number) and dash are added on later.
I'm thinking this is a problem with pre-compiled headers is VS...
Errors:
1>------ Build started: Project: 5.3, Configuration: Debug Win32 ------
1>Compiling...
1>ISBN.cpp
1>Book.cpp...
is there a reason you're using %11s instead of just %s?
I figured that out shortly after posting, and a little banging my head against the wall.
Thanks!
this code hangs at line:
if (connect(serverSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr)) < 0)
complete code:
#include <stdio.h>
#include <string.h>
Hey guys,
I'm not sure if this is something wrong with xCode or my code itself (or perhaps a permissions issue in mac os x). Anyways my code looks like this:
#include <stdio.h>
#include...