I understand that title was rather vague, but it still holds true. Lurking these forums I have noticed how incomplete my 2 year education on C++ really is, and I am asking for your help in area's, maybe just pointing me to some resources, etc.
First off i am using dev C++ and I thought about using visual C++ 2005 (8.0?) Express edition. I am just going to type out the "Psuedo-Code" version of what my actual goal is.
I would also like to mention that I have done absolutely NO GUI programming, so this is all being ran on a PC in a DOS-type window.

I want to create a trivia "bot" although it's probably more like a game.
It will first ask you for a username/password, it will then check a mySQL db for existing username, and if the username does exist it will check the password. If both values are correct, then it will "log you in". The actual priority isn't a "log-in" system, just a system where people cannot begin the trivia without first having to "register" which is more like creating a username in the db. If they do not have a username they will then be prompted to create one. (I am a little lost with the MySQL, so if you have a resource or two I would appreciate it.)

It will then give you a selection of categories. I already have my question system setup, basically it generates a random number using srand and rand, and asks a question based upon that number. I am going to try and populate it with 100-200 questions for each category, I'm planning on implementing 5+ categories.

Everytime you answer a question correctly, it will use a sumation counter, and add +1 to your score. Once you answer 10 questions in the category, it goes back and will bring you to choose another category, or the same one, all the while keeping the points you earned. It will keep doing this until you type the string 'exit'. When you type exit, It will then write your username, Email, and points to a file, and upload it to a webserver. I aleady have a webserver, and I know how to make a page to display the file. For the upload I am planning on using CKUpload (Chillkat upload) But I think it's only for VC++ 2005, a compiler I'm not fammiliar with what so ever. I was also told of wput, but yeah, it's a little odd.

That's basically the gist of my program. Any and all help you give would be greatly appreciated. Thanks.

Recommended Answers

All 7 Replies

I started writing out all kinds of suggestions on the assumption that you hadn't done anything and weren't sure about how to begin. However, it struck me that you may have a lot of this already written and want help with the MySQL access and server upload. So what have you already completed on this project?

I guess that would be helpful huh >.<
The parts I do have completed: I think I have a "login" system, but I'm not sure if it will be compatible with whatever MySQL system I use. I so far can ask the questions, I just number the questions in an array and use a random number generator to ask them. I keep track of right/wrong. I can write them to a local file on the hard drive (I think, it's been a while, but I'm pretty sure I recall it). The only thing I do not understand is how to upload them to a server to display them on a webpage. I also do not understand how to create a "login" system, my initial thought was just to ask them for user/password in the program, and have it check the db, returning a 1 or 0 based upon correct login/bad login. I'm not quite sure how to do that outside of my program. Honestly, I should be considered a very basic programmer. I've spent 2 years learning the language, but I'm just not as advanced as I should be ( I will blame this on my teacher who only took a 2 week class at a local community college, and that somehow certified him to teach the language... -_-) Sorry to go off on my little rant there, lol, but I appreciate your reply.

Also, I will try and post the code in a day or so. my laptop I program on is currently unavailable to me, so I cannot access my code. Hopefully from there you can guys/girls can give me some other suggestions for improvement.
Also, I've only ever heard that GUI Programming in C++ is nothing short of horrible. It's a daunting task, but it's something I would like to get involved with. If you have any resources or anything that would be beneficial for helping a new-kid like me delve into the world of GUI programming, It would be greatly appreciated.

This is like my 5th time editing it.
I am planning on using the playsound() function to play a sound when a question is answered correctly/incorrectly. Now, is there a function that will allow me to a background sound, such as a .wav file, or a .mp3 file continuously? This is geared more towards background "music" Which will probably be something I make up in FLV studio.

Any help anyone?

How about FMOD or something...

Also, MySQL is easy. Anyone can learn it, so just read a few tutorials.

I'm familiar with SQL, my problem is how to upload a file into a server with C++.

Well, for fairly small files you can store them in a BLOB field in MySQL.

"hacker9801" I understand how to store them in a database, I do not understand how to GET THEM TOO THE DATABASE using C++. Please, quit saying the same thing, when it quite clearly is not what I am looking for. It seems you are just trying to raise your post count.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.