Announcement

Collapse
No announcement yet.

C++ help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Here is a photo of what I am replacing. They run all the way around the store.
    The second is a partial pic of my store.





    Apache

    Where do you put the Bayonet?
    Chesty Puller (upon seeing a flamethrower for the first time)
    I am all in favor of keeping dangerous weapons out of the hands of fools. Lets start with typewriters.
    Frank Lloyd Wright

    Comment


      #17
      Nice! Not sure what it has to do with c++, but it is nice

      Comment


        #18
        Wrong place. I was tired last night.
        Apache

        Where do you put the Bayonet?
        Chesty Puller (upon seeing a flamethrower for the first time)
        I am all in favor of keeping dangerous weapons out of the hands of fools. Lets start with typewriters.
        Frank Lloyd Wright

        Comment


          #19
          Wow thanks apache for shedding some "lights" on this problem

          Comment


            #20
            LOL Apache,
            K3BASFM. "Lead, follow, or get out of the way."
            sigpic

            Support Cainslair. Donate here! Cain's Lair Forums

            Comment


              #21
              Originally posted by Pumpkin_Jack View Post
              Wow thanks apache for shedding some "lights" on this problem


              Originally posted by Minerva View Post
              LOL Apache,
              Old age is a pitiful thing.

              Apache

              Where do you put the Bayonet?
              Chesty Puller (upon seeing a flamethrower for the first time)
              I am all in favor of keeping dangerous weapons out of the hands of fools. Lets start with typewriters.
              Frank Lloyd Wright

              Comment


                #22
                Alright terrible stuck on this one. Absolutely lost its due friday at noon so no rush. But here is what i have to do Lab 5 Directions

                Here is what i have

                #include <iostream>
                #include <string>
                #include <math.h>
                using namespace std;
                void changeSong( int indexToChange );

                // A 3-array table
                // Each array has 3 elements, 0-2
                string Artist [ 3 ];
                string Albulm [ 3 ];
                string Song [ 3 ];
                int Songnum [ 3 ];
                int userChoice = 0;
                int x; // generic int variable

                int main()
                {
                while (true)
                {
                userChoice = printMenu ();
                // populate 3 arrays with data
                Artist [ 0 ] = "Aerosmith";
                Albulm [ 0 ] = "Just Push Play";
                Song [ 0 ] = "Jaded";
                Songnum [ 0 ] = 0;

                Artist [ 1 ] = "The Beatles";
                Albulm [ 1 ] = "Abbey Road";
                Song [ 1 ] = "Come Together";
                Songnum [ 1 ] = 1;

                Artist [ 2 ] = "Led Zeppelin";
                Albulm [ 2 ] = "Led Zeppelin";
                Song [ 2 ] = "Dazed and Confused";
                Songnum [ 2 ] = 2;


                // ask the user which record to display
                cout << "Enter index to display...";
                cin >> x;

                // check within range 0-4
                if ((x >=0) && (x <=4))
                {
                cout << "Item: " << x << endl;
                cout << "Artist: " << Artist [ x ] << endl;
                cout << "Albulm: " << Albulm [ x ] << endl;
                cout << "Song: " << Song [ x ] << endl;
                }//end if

                // call change song function for the user-selected index
                changeSong( x );

                // display the whole table
                for (int ix=0; ix<=4; ix++)
                {
                cout << " Artist: " << Artist [ ix ] ;
                cout << " Albulm: " << Albulm [ ix ] ;
                cout << " Song: " << Song [ ix ] << " for index " << ix << endl;
                }//endfor

                } // end program

                // function to change the age of one record
                void changeSong( int indexToChange )
                {
                int newSong;
                cout << endl << "Enter new song name: ";
                cin >> newSong;

                Song [ indexToChange ] = newSong;
                } //endvoid
                }// end whiletrue


                int printMenu( ) {

                int selection = -1;

                cout << "0. " << endl;
                cout << "1. " << endl;
                cout << "2. " << endl;
                cout << "3. Exit" << endl;
                cout << "Enter choice, 0-3: ";
                cin >> selection;
                cout << endl;

                return selection;
                }

                Comment


                  #23
                  Formatting?

                  it is kind of a pain to try to read code with no indentation...

                  OK:
                  1. It would be easier to just declare your arrays with the entries.
                  EX.
                  string Artist [ 3 ] = {Aerosmith, TheBeatles, LedZepplin};

                  2. You need to set up a menu like in the instructions, then based on the user input, I would call a function to do what they want. For example, create PrintDatabase function, ChangeSong function, ChangeArtist function, etc. Then the main function is just a loop showing the main menu and calling functions using a switch.
                  [url=http://www.enjin.com/bf3-signature-generator][img]http://sigs.enjin.com/sig-bf3/1fad512dc784c11c.png[/img][/url]

                  Comment


                    #24
                    Did you get it done in time? I went offline Wednesday and didn't come back till today.

                    Comment

                    Cain's Lair Forums Statistics

                    Collapse

                    Topics: 26,187   Posts: 269,850   Members: 6,183   Active Members: 6
                    Welcome to our newest member, Fermin13Q.

                    Today's Birthdays

                    Collapse

                    There are no members with birthdays today.

                    Top Active Users

                    Collapse

                    There are no top active users.

                    More Posts

                    Collapse

                    • Reply to Hi guys!
                      by Evil_T0NY {CLR}
                      I've been Alpha and will be Beta testing the Delta Force game. It's been really getting good reviews! Definitely a good Battlefield feel to it like the...
                      14 Nov 2024, 08:50 PM
                    • Reply to Hope your all OK over there
                      by Apache Warrior
                      We had 17 inches of rain from the storm on November 7, 2024.
                      Apache
                      11 Nov 2024, 07:55 AM
                    • Reply to Hope your all OK over there
                      by Sirex
                      Aye, I'm inclined to agree with that lmao
                      Gone are the days of warm summers and snow filled winters here, nothing but rain and wind for 8mths of...
                      10 Nov 2024, 08:53 PM
                    • Reply to Hope your all OK over there
                      by Apache Warrior
                      Now we have had a lot of flooding in this area and there are still a lot of houses that have not been repaired. Must be the apocalypse.
                      ...
                      8 Nov 2024, 09:23 AM
                    Working...
                    X