Search found 3 matches

Return to advanced search

Re: Help

Woah. Yeah, that code has some problems. tgoe's right, this is an indent error. That whole block of code needs to be indented so that it's inside the loop() function. The code still won't run, mind - there are a bunch of indentation errors throughout, and you need to fix all of them for it to work. ...
by Qahwah
on Thu Nov 20, 2008 11:11 pm
 
Forum: Interpreted Languages
Topic: Help
Comments: 9
Views: 8520

Re: Using MS-DOS in C++

What happens when you use system()? It should work, that's what the function's there for. Just read in a string with scanf (actually, I would use fgets() instead of scanf(), which is a potentially unsafe function - though that isn't too important at this level of coding) and execute it with system()...
by Qahwah
on Sun Nov 16, 2008 3:40 pm
 
Forum: C and C++
Topic: Using MS-DOS in C++
Comments: 12
Views: 11058

Re: Help

Uh, just from the snippet you posted, your problem isn't an indentation one. Return statements only belong inside functions, and unless you omitted the def function(): line, that isn't one. You need to either move that while statement inside a function, or replace the return with something else, lik...
by Qahwah
on Sun Nov 16, 2008 2:44 am
 
Forum: Interpreted Languages
Topic: Help
Comments: 9
Views: 8520

Return to advanced search