Project

This is a discussion on Project within the C++ Programming forums, part of the General Programming Boards category; Hi everyone, my name is Ryan. And I'm quite new to C++ Language. I'm looking for opinions on good basic ...

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    5

    Project

    Hi everyone, my name is Ryan. And I'm quite new to C++ Language. I'm looking for opinions on good basic projects involving C++ that I would be able to do. Just wanted some opinions, being that you guys have been giving opinions to other beginners.

    Thanks in advance,
    - Ryan

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    Well... being new to c++ your first project would be learning C++. The tutorials all over the web, the book recomendation on this forum (check the sticky thread with that name) and these forums themselves are a good way to start learning.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    163
    Just how new are you?

    You could try this:
    Write a program that displays the following menu:

    1. Calculate for a Circle
    2. Calculate for a Rectangle
    3. Calculate for a Triangle
    4. Quit

    Please enter a choice (1-4):


    Then after a choice of 1, 2, or 3 is made a from this main menu, a second menu is presented to ask whether they wish to calculate the circumference or the area for that shape.

    After the user enters a choice of the shape and calculation desired the program should ask for the appropriate dimensions (a radius for a circle; length and width for a rectangle; Base and heighth for a triangle) and then it should display the desired vlaue and redisplay the main menu.

    The program must validate the input and not allow any negative numbers as dimension values. It should also validate the input for the menu and only allow values 1, 2, 3, 4


    If you're past doing that kind of stuff, then try it with classes instead of just procedural.

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    5
    Thanks, for opinions.

    Mario F. --> I have read the tutorials offered on this site. It was great help.

    System_159 --> I have started a calculator project. Thank You.

    One question is, I have Dev C++ 4.9.9.2 and it seems that the compiler doesn't take much coding. I mean, some code I try to enter in the program. And it simply doesn't know what it means. Any suggestions or places where I could get maybe a better compiler?

    Thanks,
    - Ryan

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    5
    Also, in my coding for the calculator, I wish to divide each section (the sections being: Add, Substract, Multiplie and Divide) into cases.

    Example:

    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
        cout<<"Welcome, what would you like to do?\n";
        cout<<"1- Add\n";
        cout<<"2- Substract\n";
        cout<<"3- Multiplie\n";
        cout<<"4- Divide\n";
        cin.get();
        cin.ignore();
    {	
           case 0:
                EXIT();
                break;
           case 1:
                cout <<"Enter two numbers to add./n";
                cout <<">";
                cin >> C.num1;
                cout<<">"
                cin >> C.num2;
                C.equal = C.num1+C.num2;
                cout <<"Answer = " << C.equal<<end1;
                system("pause");
                RorQ();
                break;
    Now that is just my add case. Now when I compile and run. It says: case label '0' not within a switch statement. Any help greatly appreciated. And keep in mind. I am new.

    Thanks,
    - Ryan

  6. #6
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    Quote Originally Posted by Grinder
    Thanks, for opinions.

    Mario F. --> I have read the tutorials offered on this site. It was great help.

    System_159 --> I have started a calculator project. Thank You.

    One question is, I have Dev C++ 4.9.9.2 and it seems that the compiler doesn't take much coding. I mean, some code I try to enter in the program. And it simply doesn't know what it means. Any suggestions or places where I could get maybe a better compiler?

    Thanks,
    - Ryan
    Compilers don't make mistakes, people do.
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

  7. #7
    Registered User
    Join Date
    Sep 2006
    Posts
    5
    Quote Originally Posted by Sentral
    Compilers don't make mistakes, people do.
    Agreed, but I even tested the compiler with a program that already works. And when I open it in Dev C++ and Compile & Run it. It says that there are errors in it. Yet I can open the program and use it.

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    I really suggest you don't think starting a project. The questions you are making (and some of the assumptions you are making) are a clear sign you need to gain more knowledge of C++.

    Again... read tutorials, buy books and ask here.

    One question is, I have Dev C++ 4.9.9.2 and it seems that the compiler doesn't take much coding. I mean, some code I try to enter in the program. And it simply doesn't know what it means. Any suggestions or places where I could get maybe a better compiler?
    Dev-C++ uses by default the MinGW compiler. Assuming you didn't change it to another compiler, you are using one excellent compiler. The code is wrong. The compiler is not. If it can't understand the code, the code is either not C++ or is wrong. If you can still build but you get "errrors", then you are not looking at errors. Youy are looking at warnings.
    case label '0' not within a switch statement.
    read about the switch statement on this website tutorials
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #9
    Its hard... But im here swgh's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,475
    Try a simple program like this:

    Code:
    #include <iostream>
    
    using std::cout;
    using std::endl;
    using std::cin;
    
    int main ( void )
    {
       cout << "Hello World!" << endl;
    
       cin.get();
    
       return 0;
    }
    This is a very basic program in C++.

    Somthing rather complex is:

    Code:
    #include <iostream>
    
    using std::cout;
    
    int main ( void )
    {
       int total = 10;
       int *ptr = &totol;
       cout << *ptr << endl;
    }
    Try somthing simple, then work your way through. The tutorials on this site are a great help

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Dynamic Binding
    By gpr1me in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2006, 08:01 AM
  4. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 07:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21