Ideas for C++ projects

I am a BS EE student and I have to make a C++ project. I am in my second semester. I am familiar with the use of loops, conditional statements, and a little bit about arrays, functions and pointers. In my first semester I made a MATLAB project that was like a model of an ATM machine, that showed money and transaction options on entering passwords.
So what kinda project should I make in C++ considering that I am a beginner or lets just say intermediate level programmer. Ideas please?
Couldn't you make a C++ version of your MATLAB project?

Presumably it's a different module and the languages are very different, so I'm guessing it'd be a viable project.
No this time it is a compulsion to do something different, what about the quiz program, you know that takes quiz and gives score and may be I can make a program that kinda talks to the user but like not voice using text. What do you think?
Create a c++ compiler.
A C++ compiler would be difficult. You'd probably have to write lexical and syntax analysers and some sort of code generator to convert data into assembly instructions. You'd also need to write a parser and probably implement a syntax tree, maybe brush up on reverse Polish notation. Maybe a compiler for a simpler language than C would ease the process but it'd still be difficult. I once had an assignment to write a compiler for a made up C style language called C--. Ended up getting a first class grade but it was pretty tough.

I think a machine that talks to the user (through text) would also be difficult. Theoretically easy enough, but making a convincing AI would be difficult.

The quiz is a good idea. Depends on your current knowledge of C++ and what you are expected to show in this assignment.
I am working on an app that allows users to guess what a word is a single character at a time. Each word is given a total weight value depending upon characters used. When you use letters like 'S', 'E' & 'T" for example, they are of the most common and you lose more points than if you were to use 'Z','X','Q'.

I like to know what's under the hood, so what I do is design an algo, pump it through varying arguments to the compiler and scrutinize object code. This type of program makes for simple subs and procedures, but yet comprehensive enough to use strings and templates.

So if you'd like to collaborate, I can help you along with a project like this.
Create or implement a terminal game. The into C++ class at my university had several projects where they created games like Craps, tic-tack-toe, matching games, black jack, etc. That can all be done fairly easily in procedural C/C++.
Make a spectral analyzer. Send audio samples through an FFT, you get the magnitude of different sections of the wavelength spectrum in your output. Plot the data in realtime.
Agree with iHutch, I'll go with the quiz idea, other ideas are not according to my level of knowledge but anyways thanks to all of you
So what kinda project should I make in C++ considering that I am a beginner or lets just say intermediate level programmer. Ideas please?

Let's say beginner. You may have undersold yourself, but your description doesn't sound like "intermediate" to me. A quiz should be ok, although it probably won't keep you busy for very long. The questions / answers should be read from a file, classified by difficulty. Questions should be asked in random order, but with increasing difficulty. Players should be ranked by the number and the difficulty of the questions they have answered, and there should be a highscore that lists both.

If I guessed your skill level right, this should keep you busy for a few days (unless you have a lot of free time), more if you want to get really detailed.
I was thinking of using switch case command for the questions and answers and then use the rand command
I don't know how to grab questions from another file, can you help me how to do this? How can questions be grabbed from a file, you mean like from a MS word doc or notepad doc, how?
Have you not come across ifstream yet? If not, see this site's tutorial:
"Input/Output with files"

Reading the questions from a text file (which is the format that Notepad works with) should be reasonably straightforward. Word requires a good bit more work to deal with, so I'd leave it well alone for now.
You know I am not familiar with this reading and writing to files thing, can anyone please do it for one question and post the code, then I will do it for like a 100 questions, please do it for one or two questions, anyone.!!! Thanks
can you guys gimme some idea that is less difficult and time taking?
Last edited on
I like iseeplusplus's idea, although if you're only in your second semester you may not be familiar with the math required for fourier transforms yet.

Try some calculation type of program instead of a game. For instance, calculate the position of 3 planets caught in each other's gravity after a specified duration.

Or, let's pretend you're an air traffic controller. You have two radar stations and you see an aircraft that is picked up. All you know is the direction each station is pointing... calculate your aircraft's position.

Maybe calculate the bearing and distance between two objects on a sphere.

Maybe calculate an exponential decay of radio-activity following a nuclear facility core-breach. Output the radiation levels at various intervals and flag specific events such as when plants may grow again and when it is safe for people to return.

Maybe create a monte-carlo simulator for statistical analysis.
regarding your file thing:
ifstream fin("input.txt");    // Opens input.txt in the current directory
ofstream fout("output.txt");  // Opens/Creates output.txt in the current directory
string line;                  // container to hold a line of text

getline(fin, line);           // Gets the first line of the text file and puts it in our string;
cout << line;                 // outputs the line to the console;
fout << line;                 // outputs the line to a file. 

It's as easy as that!
Last edited on
Thanks @stewbond.
But what if I want to get the second or third line of text file, what to do in that case, I will have like 30 questions in 30 lines, how to get them all one by one, I will use rand command to generate 30 random numbers, now how to get that random numbered line from that file?
Topic archived. No new replies allowed.