Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Learning C++


FuzzMaster

Recommended Posts

After buying a book on C++ at the age of ten, getting freaked out by it, and not touching it for five years, I have decided to pull out the book again, and learn C++.

Much easier than I expected. I'm having a lot of fun. Book gets boring droning on about variables, so I just started coding something, and with (a lot) of Lightning's help, I was able to create something that could be... mildly useful.

Ironically, I coded it when I should have been studying for final exams and whatnot.

http://www.lightbox.org/~fuzzmaster/StudyGuide22.cpp

http://www.lightbox.org/~fuzzmaster/StudyGuide22.exe

Any comments on coding, or suggestions, or anything?

Link to comment
Share on other sites

Though I know nothing about C++ coding other than it exists and it's called C++ it would appear what you've created is some sort of quiz database, someone inputs a new question and answer for someone else to take the quiz.

Correct me if I'm wrong.

This looks alot easier than I thought it would be, I might give it a shot sometime.

Link to comment
Share on other sites

umm...

What's this line: system("PAUSE > NUL");

I learned: system("PAUSE");

What's the "NUL" part for?

[Edit]

Figured it out. Removes the "Press any key to continue" that is usually outputed.

I just compiled it, and seriously wished it read input from a file, so you didn't need to input everything yourself at runtime.

It's also much cleaner than any code i've written...

Link to comment
Share on other sites

What it does: You add a question to a vector, and then the answer to another vector, and then it spits out the questions, in order, then you put in the answer. If it's wrong/right, it tells you.

I just updated it to make it a little more concise. It used to say "yes" or "n0", now it tells you the correct answer.

Link to comment
Share on other sites

C++ freaked me out when I tried learning it myself. Then I took it junior year and thought it was really easy. We did a lot of cool things, though we didn't learn how to make actual graphics until our final project, which was to program Mankala, which inevitably led to us creating hidden buttons that gave the player an instant win and whatnot. I remember spending weeks on a program that made an ASCII Kirby dance...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...