Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #3K
~11.2K People Reached
Favorite Forums
Favorite Tags

17 Posted Topics

Member Avatar for Smartflight

The code for srand() and rand() is [CODE]void __cdecl srand (unsigned int seed) { #ifdef _MT _getptd()->_holdrand = (unsigned long)seed; #else /* _MT */ holdrand = (long)seed; #endif /* _MT */ } int __cdecl rand (void) { #ifdef _MT _ptiddata ptd = _getptd(); return( ((ptd->_holdrand = ptd->_holdrand * 214013L + …

Member Avatar for Smartflight
0
267
Member Avatar for rmlopes

[CODE]#include <stdio.h> #include <stdlib.h> #include <time.h> void thread_function( void* arg ) { time_t start, finish; long loop; double result, elapsed_time; time( &start ); // Your thread code time( &finish ); elapsed_time = difftime( finish, start ); printf( "\nThread takes %6.0f seconds.\n", elapsed_time ); }[/CODE] The code counts for the execution …

Member Avatar for JohnDiego
0
5K
Member Avatar for Hojjat.Mojallal

Optimizing the tree can be really tricky but there are some ways to do it. So if the parent node is '*' and one of the child nodes is 0 then you can delete the child nodes. For changing x + x in 2 * x it doesn't really matter …

Member Avatar for Hojjat.Mojallal
0
628
Member Avatar for ivaylo91

A more elegant solution to this problem is to search in all directions for the improvement and advance step-by-step, like optimization methods do. [CODE]#include <stdio.h> float functionValue( float x, float y ) { if ( y != 1 ) return ( x + 1 ) / ( y - 1 …

Member Avatar for ivaylo91
0
2K
Member Avatar for vbx_wx

so it looks like the path to the .cpp file is wrong: g++: no input files I haven't work with eclipse on windows but in unix the include path of th makefile finished with "-I" : -I"c:\MinGW\lib\gcc\mingw32\4.5.0\include\c++\tr1\" -I. or: -I c:\MinGW\lib\gcc\mingw32\4.5.0\include\c++\tr1\ -I.

Member Avatar for vbx_wx
0
122
Member Avatar for nolife
Member Avatar for Cosmin871
0
332
Member Avatar for Arbus
Member Avatar for waldchr
Member Avatar for Cosmin871

I'm trying to compile the linux source code release of Axis2/C on MacOS but I'm getting errors at building axutil.h. I've tried to apply different patches without success, and I even found a website that explained the necessary modifications in the code and I made them but they still didn't …

0
57
Member Avatar for Icebone1000

The [I]shutdown[/I] function disables sends or receives on a socket and you are using the ConnectSocket after the [I]shutdown[/I] function to receive info. The [I]shutdown [/I]function is normally used before the [I]close[/I] function so that you stop the stream flow before you close the socket.

Member Avatar for lashatt2
0
842
Member Avatar for guguman
Member Avatar for SVR
0
140
Member Avatar for UKmason
Member Avatar for scantraXx-

your problem is here: [CODE]if (i = -1)[/CODE] the condition is always true try using [CODE]if (i == -1)[/CODE]

Member Avatar for dkalita
0
121
Member Avatar for Rabex

Here's a tutorial: [url]http://www.cplusplus.com/doc/tutorial/classes/[/url]

Member Avatar for Cosmin871
0
87
Member Avatar for adi.shoukat

I think that the problem appears when you are casting the [I]char[/I] to [I]int[/I] (if the character is '\n' or ' ' that is impossible, plus your comparing an [I]int[/I] with EOF) try using the [I]fscanf[/I] function. fscanf (fp,"%d",ch);

Member Avatar for Cosmin871
-1
90
Member Avatar for walter clark

if you like to see the rectangle grow you will habe to work with the MouseMove event. You wil have to the previous rectangle when the mouse position has changed. Here's a good tutorial. [url]http://www.geocities.com/Heartland/Meadows/9818/win32tut/gdi.html[/url]

Member Avatar for Cosmin871
0
104
Member Avatar for Cosmin871

I have created a win32 application in which you can draw different objects(lines, rectangles, etc.) and now I want to save the drawings as bmp files because I already now how to load bmp files. These is as far as I got: [CODE]void OnSave(HWND hWnd) { OPENFILENAME openFile; TCHAR szPath[MAX_PATH]; …

0
44

The End.