ive really been stuck
http://img91.imageshack.us/img91/7803/letterssu2.gif
and i dont know where to begin
ive really been stuck
http://img91.imageshack.us/img91/7803/letterssu2.gif
and i dont know where to begin
I have absolutely no idea what you're asking...
Sent from my iPadŽ
how do i make the text go like that in c++
cout<<"a b a\n";
If you mean to be able to change stuff on the screen without it scrolling and junk, checkout curses, thats some fun stuff.
Seriously man, you couldn't possibly be less descriptive. It's literally impossible. I asked God. He agrees... it's impossible in this universe.
I'm sure you can spend 30 seconds of your life writing something meaningful for us to work with.
Sent from my iPadŽ
I think he may want to, hmm, change those chars mechanically, like this:
Code:#include <iostream> using namespace std; int main() { char letter=66; for(;;) { letter--; cout<<letter; letter++; cout<<letter; letter--; cout<<letter; letter++; cout<<endl; } cin.get(); }
That code will never run
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.
Code:#include <iostream> #include <string> using namespace std; // This is a horozontal version of what I think // (note we cannot help much if you're always // this illucid), you want. edit for vertical. int main ( void ) { string A = "AAAAAAAAA\n", B = "BBBBBBBBB\n"; char ID = 'A'; while ( true ) { cin.get(); if ( ID == 'A' ) cout<< A; else cout<< B; ID == 'A' ? ID = 'B': ID = 'A'; } return 0; }
Last edited by twomers; 08-15-2006 at 04:46 AM.
Why? Do you see mistakes? It runs on my Dev-Cpp 4.9.9.2 as I expected.Originally Posted by Mario F.
If I see mistakes?
Did you actually ran your code, or are you being smart?
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.
The code compiles and runs, I know I'm not smart, so please correct me. Are you about that infinite for(; loop? Try to compile and run it, I really want to know what's wrong there, because I won't find out myself. Also, it's not actually all code, i'd never use that loop in my programs without break; in it.
You were asked repeteadly to be more precise in what is that you want to do. You ignored these requests. Do you expect me to be more precise by explaining to you what do I mean by will not run?
I don't need to compile and run it to know it will not do what is expected. You entered an infinit loop. Your processor will jump to 100% usage and the only way to stop it is to abort the program execution. cin.get() will never run.
If you compiled and executed your own program you certainly saw this. So why ask me what is wrong. It's right there under your nose.
And... lilhahawk, do us all a big favor and do please explain once and for all what is that you want to do.
Last edited by Mario F.; 08-15-2006 at 06:37 AM.
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.
Yup, there's nothing wrong with the code. It's just a meaningless program programmed in a bit silly way. I believe this would be an easier way to print "ABA" endlessly
Edit: Mario, you are not replaying to the OP. Since he doesn't elaborate onhis wishes we're just proposing meaningless solutions.Code:while (1) std::cout << "ABA\n";
Last edited by anon; 08-15-2006 at 06:36 AM.
You should probably take a look at the name of the OP and the name of who you've been replying to this whole time. Also, saying something won't run when it does and meaning it won't run properly are two different things.Originally Posted by Mario F.
Sent from my iPadŽ
I didn't even realize I said so until now. Should have added "as expected".Originally Posted by SlyMaelstrom
EDIT: I confused you with Lilhawk overload. For that I'm sorry. Still... your code is no good. Do please read the tutorials on this website about for loops. They are only very rarely used as you did.
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.