Perhaps you could provide slightly more information other than "dont work".Originally Posted by Hugo716
Perhaps you could provide slightly more information other than "dont work".Originally Posted by Hugo716
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
You have to understand, hugo, that everyone here is trying to avoid answering this question for the 1000000000th time.
Sent from my iPadŽ
it just asks for your name. you type it and hit enter and it exits. doesnt show result and pause.
any ideas?
operator >> leaves '\n' in the input stream. your call to get pulls it out and doesn't wait like you expected it to. ignore() or loop until the junk is gone.
Ah, running from an IDE.
Use one std::cin.get(); to suck up the leftover newline and a second std::cin.get(); to pause.
Or use getline(std::cin, Name); instead of std::cin>>Name;.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
Today's kids are too lazy to run programs from the command prompt anymore. Miss the old days...
Code:#include <stdio.h> void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){ puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9 /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i] ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][ t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}
I would if I knew where to find it, do it through MS-DOS? What about on Mac OS and Linux?Originally Posted by jafet
We newbies are still learning, so it's better to put off writing makefiles and allsorts and run everything through command prompt. Saves a bit of time, and more focus on the important stuff, once that's done then go back onto the thing.
START > Run > cmd
Sent from my iPadŽ
Or go with the tools that can make the difference...
Command Prompt Explorer Bar. It's free, It's cool. It's so sexy it makes me cry. You are going to love it.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
even tho im still a noob at C++ i only use the command prompt never the IDE