Yeah, I looked at the source only after I'd posted the link.
Only the program itself is of much use to me as well.
I think I've got sending going, but I keep getting blank replies...
Type: Posts; User: SPiRiToFCaT
Yeah, I looked at the source only after I'd posted the link.
Only the program itself is of much use to me as well.
I think I've got sending going, but I keep getting blank replies...
I found a nice little program that does almost what I want, it has source code included and also when you run the program it shows you what it sends and recieves.
Have a look here:...
Yeah, I'm up to about where you are Inq. Problem is now, at Uni we have a proxy or some such so I can't work on it becuase my socket cannot connect to anything. Gonna have to wait 'till I get home....
I want to do it from within my own program, so the command line cURL isn't any use.
And the libcurl doens't seem to have much documentation, see http://curl.haxx.se/libcurl/cplusplus/
I think I'll...
Thanks salem.
I've just been off learning WinSock stuff, and now I know how to send a recieve data through a socket, all I need to know now is how to structure a GET request and send it through a...
This should work.
It's not the most efficient, but it should be fairly easy to understand
// converting the integer stored in data[i] to the for AB in hex.
int temp = data[i];
char first,...
I think you mean you want to convert from base 10 to base 16...
where the base 10 number is between 0 and 255
I'll be back in a moment with code for that...
Oh okay.
I thought it might be something like that. Just hoping there might have a been a simple way.
i guess I'll go refresh my knowledge of python and use that instead.
The win32 API? I don't...
I want to write a program that reads webpages and so on, I want to be able to enter a URL and have some code that goes out and gets the page, so like if I entered http://www.google.com/ I'd get...
If you have the images stored in an array from say element 0 to element 9, then if you have a counter that just increments every time, simply use the modulo (%) operator to keep it in the 0 to 9...
In is your input stream?
Yeah sorry I forgot, you need to pass into your function anything you want to use, so In needs to be passed in, and the variables you want to fill with data have to be...
Ah okay.
OneStiffRod's example is the most accurate.
functions are easy, you just name a function then put the code you want inside { }
I don't quite understand what you mean?
Do you mean you want it to close if you type a but not if you type man or aardvark or something like that?
For that you can use strings.
#include <string>...
It's easy to do so that hitting a then enter will close it.
To do that here is the code:
#include <iostream.h>
int main()
{
char input;
cin>>input;
while(input!='a')
>If it is one computer on the web directly just go to ipchicken.com
He wants to find his computer's internet IP from within his program, not a website.
Sorry, I don't know how to do it either....
Okay, lets see what you have...
getline is the name of the function you want to write?
And it's arguments are In and CustName?
I assume In is an input stream from the way you are using it.
What...
I mentioned them in my original post, but I'll be clearer this time.
Options>Compiler Options: Directories tab, Add the following commands when calling compiler: -Wall -Wstrict -prototypes -ansi...
I'm pretty sure you can watch for keyboard input with windows.h
Of course that only works IN windows, but there is a way of intercepting windows messages and checking if they are keypresses. I don't...
Viper, did you read the faq like Inquirer said?
You can't 'get' things like conio.h, you either have them or not.
Bloodshed DevC++ has conio.h, that compiler is about 15Mb to download, and it's...
I HAVE conio.h That's where I was using getch from. conio.h is very nice, and getch is wonderful, BUT it's non-standard. The point is, I want to be able to do this using standard stuff only.
Thanks...
Easiest way would be to use the STL string class.
Otherwise, open the file, read every character one by one using the ifstream get function, and increment a counter at each one.
then you have a...
I dunno what you mean...
I tried this:
#include <iostream.h>
#include <stdlib.h>
int main()
{
char c = (char)getche();
for(int i=1; i<=10; i++)
{
for(int k=10-i; k>0; k--)
{
printf(" ");
}
for(j=1; j<=i; j++)
{
printf("*");
printf("\n");
I'm trying to get single keypress input without having to press enter after each key.
I can do it using conio.h but that isn't supported by the standard.
Which means in DevC++ it won't let me...
lol I have to make something like that in one of my comp subjects next summester, it's going to be fun! But we don't do it in C++, we use some special AI language thingy.
However, yeah, I've spent...