• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

C++ Project Ideas..

Skilled Illusionist
Joined
Nov 21, 2012
Messages
390
Reaction score
213
I don't know if this has been asked before (and if it has, my bad) but I'm freshly starting some C++ developmental skills, and from everyone I've been told to start on small projects, and learn as you go. Again, if you have any other plausible ideas to build my knowledge on this language.. let me know.

I've been following a couple of tutorials too, helping myself learn the basics.. and I've built a program (a simple text-based calculator) all from my own knowledge, with a couple basic tweaks. I did a bit of simple declaration throughout it too.. but yeah.

Code:
/*
 * main.cpp
 *
 *  Created on: Feb 2, 2013
 *      Author: Siles
 */

#include <iostream>
#include <string>
using namespace std;

int GetUserInput()
{
    cout << "Please enter an integer: ";
    int nValue;
    cin >> nValue;
    return nValue;
}

char GetMathematicalOperation()
{
    cout << "Please enter an operator (+,-,*,or /): ";

    char chOperation;
    cin >> chOperation;

    return chOperation;
}

int CalculateResult(int nX, char chOperation, int nY)
{
    if (chOperation=='+')
        return nX + nY;
    if (chOperation=='-')
        return nX - nY;
    if (chOperation=='*')
        return nX * nY;
    if (chOperation=='/')
        return nX / nY;

    return 0;
}

void PrintResult(int nResult)
{
    cout << "Your result is: " << nResult << endl;
}

int main()
{
    // Get first number from user.
    int nInput1 = GetUserInput();

    // Get mathematical operation from user.
    char chOperator = GetMathematicalOperation();

    // Get second number from user.
    int nInput2 = GetUserInput();

    // Calculate result.
    int nResult = CalculateResult(nInput1, chOperator, nInput2);

    // Print result.
    PrintResult(nResult);
}

Of course, it isn't the best. Extremely shakey at the best of terms. But, can anyone just give me simple ideas to do? Perhaps an alarm clock kind of thing, or maybe a schedule? Something that I could get help on from the person creating the project idea.. in all reality.

Again, thanks for your help.
 
Junior Spellweaver
Joined
May 23, 2009
Messages
176
Reaction score
46
I am more untidy than you reffering to code , thanks for that example .
About your question of getting new "ideas"..well , what about an auto-shutdown helper? I mean , a program that ask you for enter the time, and then computer will be turned off passed that time! . it should be very easy for you , because it will be a cout..and cin and a simple conversion(remember than Windows uses International Systems off units which means thats it will only work with the time set in seconds!

Let me know if you do that!
 
Skilled Illusionist
Joined
Nov 21, 2012
Messages
390
Reaction score
213
I'll do my best, and thank you for that idea! I hadn't even thought of something like that, and I'll do my best. Thanks again, man!
 
Joined
Oct 11, 2007
Messages
1,706
Reaction score
517
Something I found quite entertaining was writing my own library that worked like cURL for c++, using sockets and mimicking a browser. Might be too hard for you right now though.
 
Skilled Illusionist
Joined
Nov 21, 2012
Messages
390
Reaction score
213
Something I found quite entertaining was writing my own library that worked like cURL for c++, using sockets and mimicking a browser. Might be too hard for you right now though.

I'd imagine that's a bit out of my skill-set (at least for the time-being) but certainly an adviseable learning tool when I get to that stage. I'll give you more updates when I reach that level, and thanks!
 
Not working on UnitedFlyf
Loyal Member
Joined
Apr 21, 2009
Messages
1,385
Reaction score
934
I recommend something that hasn't been done yet, something that interests you. That's how I learn best at least.
 
Junior Spellweaver
Joined
Nov 5, 2012
Messages
191
Reaction score
17
I think that you should make something completely unique. Or just make something that has already been made, but add your own cool twist to it. For example, if it's a calculator, make it have some games on it or something, like texas instrument calculators have. As no calculators that are made for PC have any games on em.
 
Newbie Spellweaver
Joined
Oct 10, 2011
Messages
27
Reaction score
14
I don't understand why people must return 0. That is bad programming and is not needed. I do not like the way you are coding your variables and why am I not seeing any prototypes? Also, try working on your nested IF statements. I know that nested IF statements are not a requirement but in the future, it is tidy and much more readable.
 
Last edited:
Skilled Illusionist
Joined
Nov 21, 2012
Messages
390
Reaction score
213
I don't understand why people must return 0. That is bad programming and is not needed. I do not like the way you are coding your variables and why am I not seeing any prototypes? Also, try working on your nested IF statements. I know that nested IF statements are not a requirement but in the future, it is tidy and much more readable.

I was simply using my very beginner-styled knowledge. It isn't my finest work, and since then; I've adapted and grown to the language increasingly. Thanks for the tips though, I'll keep those in mind.
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
I am more untidy than you reffering to code , thanks for that example .
About your question of getting new "ideas"..well , what about an auto-shutdown helper? I mean , a program that ask you for enter the time, and then computer will be turned off passed that time! . it should be very easy for you , because it will be a cout..and cin and a simple conversion(remember than Windows uses International Systems off units which means thats it will only work with the time set in seconds!

Let me know if you do that!

Code:
system("shutdown -s -t (interval in seconds)");

On-topic:
Consider doing something with objects. Try making an agenda or some sort of school administration that adds students to classes and courses. Anything similar to that would do.
 
Junior Spellweaver
Joined
Jan 8, 2012
Messages
100
Reaction score
25
Write a program of a football championship.
In which receives and shows the amount of participating teams, the number and time of matches, final result of each matches, etc.
All data is received by the program user. (Use classes if possible)
sorry for bad English :(
 
hello
Loyal Member
Joined
Jun 24, 2004
Messages
726
Reaction score
158
Someone in the topic said, try working with objects. One of ways to learn it is writing wrappers for existing functionality or external functionality ie. with API's.

Example. you may write a Facebook API wrapper in C++ - which i'm sure there is already done but, still it might be good way to:
1. Learn how to design objects and implement them
2. Learning how restfull APIs are working
3. Im guessing it might be fun to create for ex. console version of Facebook chat.

Going further if you would write such wrapper properly and it would work properly you are one step from making a desktop application as all it needs then is a GUI.
 
Initiate Mage
Joined
Feb 15, 2013
Messages
1
Reaction score
0
You know we recently came out with a new programming book based around beginner projects. It is called "The Programmers Idea Book" and features 200 projects that might be up your alley for learning new languages like C++. Check it out when you get a chance. It may help you out. :)
 
Back
Top