Yes I'll have to e-mail them about that. The font stays the same, do you have any suggestions on libraries to use?
edit: found the pngwriter library. Is it good enough or are there better ones?...
Type: Posts; User: finnepower
Yes I'll have to e-mail them about that. The font stays the same, do you have any suggestions on libraries to use?
edit: found the pngwriter library. Is it good enough or are there better ones?...
I had the idea of making a simple stock market trainer for daytrading. The idea is you see a random day-graph "unrolling" at a predefined pace. So the program has a database of historical daily...
The number of replies confirm the complexity of this. And impatient as i am, I'm moving to Python instead. I never need the low level benefits of C++ anyway.
Elysia, ok that works. But not always when used mixed with cin.get(). Maybe I've blamed the string-class because cin.get screws it up.
I've used all there is. Sometimes one method works, sometimes another does. Sometimes I have to add cin.ignore() here and there, sometimes i don't need too. Thing is, I don't want to be forced to...
Hi, I'm getting pretty sick of char * and all other things C++ fail with when I need to type in and store some text. All I want is no extra characters. No flushing buffers, cin.ignore() and things....
The thing is that the game (counter-strike: source) is, in my opinion, poorly designed. I could get a crosshair visible through the game settings but then I would have to enlarge it to the point that...
Hi, I've looked around for a program that can manipulate single pixels on the screen directly. Like if you would type in some RGB values and the position of the pixel then that pixel would change....
Make your own integer class! Or use gmp if you don't want a mountain of extra work.
something like:
char name[40];
cin.get(name, 40);
cout<<"I hate you "<<name;
No, but this isn't a really important program so I use anything that works. But I'll keep that in mind next time. I use the program to shuffle a deck of cards and then draw a hand. It makes things...
I understand now, thanks. But why did the program still output the text correctly? Isn't that impossible?
Well that was easy, it works. Can you tell me why the error occured in the first place? I might learn something.
If you don't have time to do that: thanks anyway!
I really can't understand why this code genereates a runtime error. The program actually outputs the text in the file and then the error occurs. Thankful for help.
Oh, the file deck.txt looks like...
The file was in /usr/X11R6/lib64
It works now, thanks for the help!
If anyone else want's to know, the correct command was:
g++ -L/usr/X11R6/lib64 -lX11 -o test1.out test1.cpp
I still get the same errors. Except when i add the -lX11 option I get the error:
/usr/bin/ld: cannot find -lX11
Am I right about that it should work with only the -L/usr/X11R6/lib option?
...
The g++ compiler doesn't seem to find Xlib.h on my machine. I know the file is in /usr/X11R6/include/X11. In /usr/include there is a link to the X11 folder. The compiler says this if I run:
#...
WHOA!!! I thought that was only possible in Linux. Thanks!
About google: I don't know if it was google that sucked or me not giving it proper keywords. It's always easier to blame something else :)
I wan't to know how to copy system command results into a string in my program. For example if I'd run "dir" the names of all folders would be stored in my program. In that case I would use...
Thanks alot! The extra bytes are gone and the received file looks exactly as the original. Now I'll just change it so you can pass the filename and destination as a command-line argument, but that's...
now the file is completely messed up: all newlines in the file are dark rectangles and I also have the 95 extra bytes in the end. Here's the complete code, note that there are variables and pieces of...
I just open it like this:
ofstream fout(file);
file is a char array. I'll use the open command you showed and see what happens.
I've fixed it. But i can mention that the value of i was correct at the end. Also size was always correct. I've checked the code a number of times and there are no more send's or recv's after the...
I fixed the problem. I changed "while(i < size)" to "while(i < (size-95))" (there were 95 extra bytes). Really ugly solution though. :)
Both recv and send work perfectly and don't return -1. I suspect it might be an error that has nothing to do with the program, maybe the router adds some bytes...heck I don't know.