Jump to content

Sendou

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Sendou

  1. Thanks, that does indeed work to pause the console for a set amount of time and does feel a bit more proper than what I was doing before. I do have another question though. int main() { cout << "Wait forever."; while (1 > 0) {} return 0; } Anything wrong with doing it this way to make a console window stay open indefinitely while not requiring user input? I'm not familiar with the proper standards of programming and won't be taking my Intro CS course until next semester, so I'm really just playing around in MSVC to kind of dip my feet in before I actually start any learning I'm thinking it's a bad way to do it because the program would endlessly calculate if 1 > 0... Yeah, nevermind, I think I answered my own question lol... the difference in CPU process is quite noticeable between waiting for user input to close the window and trying to keep it open indefinately using a while line. (0% CPU vs ~50% CPU)
  2. Double Major in Computer Engineering + Electrical Engineering w/ a minor in Computer Science Plus self-study every waking hour that you have available to you. (Chemistry/Mathmatics/History/Physics/etc) Obtain certifications in every possible field. (CompTIA, CCNA, MSCE) Work Part-Time in various industries dealing with computer systems/it/software engineering/etc. Then you might scratch the surface, or your brain might just asplode. I'd think you would be intellectually satisfied just going for a B.S. in CompE/EE and then working your way into a good graduate school for further studies.
  3. #include <stdio.h> int main() { printf("whatever"); system("pause>nul"); return 0; } I usually use a system pause>nul. This will leave the CMD window open without requesting any user input. But I'm a newbie, so forgive me if I'm wrong. But I'm not sure if it works in C, since I've been learning C++ with MS Visual Studio 2010 Pro. Reading online, this doesn't look like it's meant to be standard practice, soooo... take it for what it's worth. It gets the job done, but there has to be a better way.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.