|  | 
	|  | 
	| 
		
			| Re: i have run into a problem... [message #213138 is a reply to message #213133] | Mon, 14 August 2006 04:07   |  
			| 
				
				|  |  jnz Messages: 3396
 Registered: July 2006
 Location: 30th century
 
	Karma: 0
 | General (3 Stars) |  |  |  
	| | light wrote on Mon, 14 August 2006 11:01 |  | I'm more a Java person but i'll ask the stupid questions anyway.
 
 1. Does break; break both while loops of just one? (And why do
 
 | 
 it will just break the loop that it is in.
 
 
 | light wrote on Mon, 14 August 2006 11:01 |  | 
 2. Would it not save resources and allocation to declare your strong outside your second while loop?
 
 
 | 
 Yes. do you mean "string" *not sarcasticly*
 
 
 | light wrote on Mon, 14 August 2006 11:01 |  | 
 3. EDIT: Wait, on reflection using return 0; inside a method that is not main() is probably your issue. Try removing it. Return 0 basically means "All went well, terminate program, but only main() should call it.
 
 
 | 
 
 No, the decloration suggests that it should return a DWORD. return 0; does not mean "all went well", it means in "main" terminate program with exit code 0.
 
 in any function, as far as i know, exept a thread return 0 means that the function when finished will be equal to 0. in breif terms. this may not be all correct, but it is when i think of it.
 
 
 BTW: a "DWORD" is a number (i think) i don't see why you can't just use "int"
 
 thanks for your reply.
 [Updated on: Mon, 14 August 2006 04:08] Report message to a moderator |  
	|  |  | 
	|  | 
	| 
		
			| Re: i have run into a problem... [message #213252 is a reply to message #213132] | Mon, 14 August 2006 16:46   |  
			| 
				
				|  |  danpaul88 Messages: 5795
 Registered: June 2004
 Location: England
 
	Karma: 0
 | General (5 Stars) |  |  |  
	| Also, your code says while(l), but as far as I can see you have not initialised l... you probably need to do int l = 1;
 or something before starting the while loops (unless its defined in one of those include files)
 
 
 
 
 EDIT: And yes, that code would produce an infinite loop.
 
 
   [Updated on: Mon, 14 August 2006 16:46] Report message to a moderator |  
	|  |  | 
	| 
		
			| Re: i have run into a problem... [message #213344 is a reply to message #213132] | Tue, 15 August 2006 06:49  |  
			| 
				
				|  |  jnz Messages: 3396
 Registered: July 2006
 Location: 30th century
 
	Karma: 0
 | General (3 Stars) |  |  |  
	| the code doesn't say "while(l)" it says "while(1);" since it is a new thread it doesn't matter if it goes into a infinit loop because it wont halt the program. it goes into an infinite loop to recive data on port 3002. 
 
 after alot of debuggung, i have fixed it. it turns out that LoadScopes() function must be called 2 times because i put my function call just after that. when it got called the 2nd time it tryed to open port 3002 which is already open and it crashes.
 |  
	|  |  |