move functions to new file) Did that, lost 2 errors.
users is a typedef of vector<user> and user is defined. All the necessary definitons do exist.
Oddly enough, converting all the TCPsockets...
Type: Posts; User: Dark Nemesis
move functions to new file) Did that, lost 2 errors.
users is a typedef of vector<user> and user is defined. All the necessary definitons do exist.
Oddly enough, converting all the TCPsockets...
How exactly do I do that?
Perhaps you need to use threading? Both boost (C++) and SDL (C or C++) provide portable threading libraries if you don't have one with your compiler. Threading is when two segmets of code are being...
Nay, that did not work. I do know that TCPsocket is a pointer to a structure. One of the error messages gives that away. It's the ")" error messages that are most liekyl the culprit of the rest of...
Could someone define what the compiler means when it gives the error "... cannot start a parameter declaration". I don't understand why the compiler would care what the first parameter is.
...
Post your own.
Two file size functions and a fgetline function.
Two file size checking functions, you'll need to include stdio.h if you want to use either one. The first takes a pointer to a...
#include <ctime>
char *str;
time_t cur_time = time(NULL);
//cur_time should be your calaender time (in seconds) from:
strftime(str, 128, "%A %d %B %H %Y", 0);
printf("%s", str);
<a href="http://www.libsdl.org">SDL</a>
cout.sync_with_stdio(true); //Sync cout with the C io functions
freopen("file.txt", "w", stdout); //stdin for cin
Put that before you use cout.
You'll need <cstdio> (maybe <cstdlib>)
1) They return 0
2) CON is the console redirecting to the 'file' CON redirects to the console.
3) See above.
con = fopen("CON", "w");
if (!con) {
printf("Cannot open CON\n");
}
That bit of code (after SDL_init()) causes Cannot open CON to be printed to stdout.txt ratrher than pointing a valid...
Yay! It works, thank-you!
I'd like to use directx with the borland command-line compiler, but I get the following error. I was wondering what libs are needed for DirectX areas (right now all I need it DirectInput) and how to...
Won't that wipe the disk though?
I've looked at fdisk, but I don't know what area tells me if it is bootable, I have primary dos partition active on the d: drive, but can't make an extended dos partition, due to a lack of space...
Haven't formatted the D: drive
I just used a sys command.
C: drive is my current boot drive, and everything that is on c: is now also on d:.
I'm having problems with windows, it's been bugging me alot, my 700MB drive is the favored dumping grounds for temporary files for any of my programs that use such a feature (even if I tell them to...
Numbers should match with the numpad, the numpad would make it easier to play. Other than that kick-ass.
Try the windows board.
A coin toss isn't random, the force rotation and direction of force in addition to obscuritues, friction and distance to travel will result in the side that is face up, nothing is truly random,...
PHP is open source afaik, so edit the code to allow for the server (having to use the modeed php) to communicate with your program, of course you have to use your own server to do this, unless you...
Simple: make the program write an lnk (shortcut) file in the C:\windows\start menu\programs\starup folder, that will make your program run on start-up quite easily. Open a lnk file in notepad (or...
Edit: I've found out what it is, thaks for your help, the problem was I was loading so many bitmaps but never freeing them. [/edit]
g_BoardArray was originally a 1D array, I forgot to update the...
Alright, on startup the program run Init() which has the following relevant code:
for(int y = 0; y < BOARD_HEIGHT; y++)
{
for(int x = 0; x < BOARD_WIDTH; x++)
{
//Do a switch on the...