• 0

    posted a message on Could use some C++ programming homework help.

    @s3rius:

    Thanks dude, this book really doesn't explain much about how things work and since it's a directed study i meet with my teacher once a month if that. I have just started using files to store data and for some reason it seems like there is a lot more complexity than there needs to be. Maybe I am just slow or i'm missing something because everything up until this point worked very easily, almost without thinking.

    By the way, that getline syntax was really nice. Other people were telling me to do like a document.cin([Large Number],Text,'\n') which didn't seem like a good idea to me.

    Cheers, feel free to add +1 internets

    Posted in: Off-Topic
  • 0

    posted a message on Could use some C++ programming homework help.

    @happy04

    output is working now, it was really nice to have your stuff to look at. For some reason my string wont allow spaces in it, it just ends if there is a space. I don't understand why it is doing that.

    // code::::

    // Programmer : Maxwell Hill
    // Assignment : Final
    //                Write a program that gives and takes advice on program writing. The program starts by writing a piece of advice on the screen and asking the user to type in a different
    //                piece of advice. The progarm ends. The next person to run the program receives the advice given by the person who last ran the program. The advice is kept in a file
    //                (name it advice.txt and the contents of the file change after each run of the program. You can use a text editor (NotePad) to enter the initial piece of advice in the
    //                file so that the first person who runs the program can recieve some advice. Allow the user to type in advice of any length so that it can be any number of lines long.
    //                The user is told to end his or her advice by pressing the Enter key two times; you can handle that any way you like.

    #include <iostream>
    #include <string>
    #include <fstream>

    using namespace std;

    void Explanation();
    void LastUser();
    void CurrentUser();

    string Text = "";

    int main()
    {
        
        system("cls");
        Explanation();
        LastUser();
        CurrentUser();
        system("pause");

        return(0);
    }

    void Explanation()
    {
        cout << "    PROGRAMMING ADVICE    " << endl << endl;
    }
    void LastUser()
    {
        
        ifstream document;
        document.open ("advice.txt");
        cout << "Here is the advice given by the last person who ran this program:" << endl << endl;
        while (!document.eof())
        {
                    getline(document,Text,'\n');
        }
        cout << Text <<endl;
        
        document.close();
        
    }
    void CurrentUser()
    {
        ofstream document;
        document.open ("advice.txt",ios::out);
        cout << "Please enter your advice below. Your advice may be as long as you" << endl;
        cout << "need, but please indicate the end of input by pressing <Enter> twice:" << endl;
        cin >> Text;
        cout << Text;
        document << Text;
        
        document.close();
    }

    Posted in: Off-Topic
  • 0

    posted a message on Could use some C++ programming homework help.

    @iSaintx: Go Thanks :)

    @RedFromWinter: Go

    im looking at your code and it really made a difference, not sure where i stand right now, i'm trying to figure it out but i'll update this in probably an hour or two with wether or not i finsihed the program.

    Posted in: Off-Topic
  • 0

    posted a message on Could use some C++ programming homework help.

    I have some fairly simple, or so i thought, code that i had to write for an example problem. The book i'm following is not very straightforward, and it really doesnt even have examples of how code should be written to work properly. it just basically defines functions and says what they do but not how to use them. It's a directed study so i don't really ever meet with my teacher. I could use some help on this topic and if someone could explain to me how to move data out of and back into files it could help me finish the rest of my programs before the due date. Which by the way is in three days from now. Source code that needs fixing is below. I am using visual studio 2010 for c++

    Programmer : Maxwell Hill Assignment : Final Write a program that gives and takes advice on program writing. The program starts by writing a piece of advice on the screen and asking the user to type in a different piece of advice. The progarm ends. The next person to run the program receives the advice given by the person who last ran the program. The advice is kept in a file (name it advice.txt) and the contents of the file change after each run of the program. You can use a text editor (NotePad) to enter the initial piece of advice in the file so that the first person who runs the program can recieve some advice. Allow the user to type in advice of any length so that it can be any number of lines long. The user is told to end his or her advice by pressing the Enter key two times; you can handle that any way you like.

    1. include <iostream>
    2. include <string>
    3. include <fstream>

    using namespace std;

    void Explanation(); void LastUser(); void CurrentUser();

    string Text = "";

    int main() {

    system("cls"); Explanation(); LastUser(); CurrentUser(); system("pause");

    return(0); }

    void Explanation() { cout << " PROGRAMMING ADVICE " << endl << endl; } void LastUser() { fstream document ("advice.txt"); document.open ("advice.txt", ios::in); cout << "Here is the advice given by the last person who ran this program:" << endl << endl; getline(document,Text,'#'); cout << Text <<endl << endl;

    } void CurrentUser() { fstream document; document.open ("advice.txt", ios::out ); cout << "Please enter your advice below. Your advice may be as long as you" << endl; cout << "need, but please indicate the end of input by pressing <Enter> twice:" << endl; cin >> Text; document << Text; document.close(); }

    Posted in: Off-Topic
  • 0

    posted a message on Question: Any Halo Models?

    @Colt556: Go

    Colt... your uneducated, vulgar, and disgraceful opinions and mannerisms are not something that really belongs here. You cannot use models from any game not owned by blizzard unless you have express consent from the creator of said model. You should refrain from profanity on the mapster forums, and you should also respect other people even if you disagree with their views. You came here asking for help, and when you got your answer and it wasn't what you wanted you raged. Please take this attitude elsewhere. It is not productive.

    You do have the right to make your own content outside of blizzard, so if you have a problem then don't support them. Make your own game, distribute it on the itunes marketplace, distribute on pirate bay, distribute anywhere. You can get content out to people and you don't need blizzard, just like this discussion doesn't need to be made.

    Another thing, if you can find models you like that are public domain, you can simply get a student edition of 3ds max 2011 from the autodesk website and make your own bones and animations to make the models work properly. Just convert them to m3's when you're done and that's roughly all you'd need to do. Mapster isn't about doing things for you, it's about explaining to you how to do something once you've tried and got stumped.

    Posted in: Artist Tavern
  • 0

    posted a message on Roads Bugging

    @Beffyman: Go

    Well, if you won't post the map you'll have to give more information on how your roads were formed, if you can re-create this glitch on other maps, and other things like that. I cannot create the glitch you display.

    Posted in: Terrain
  • 0

    posted a message on Creating 'Grass' Doodad

    @Gurrgel: Go

    I will look into this because i am interested myself. Send me a PM and i will reply to it when i get an answer for you.

    Posted in: Terrain
  • 0

    posted a message on [Feedback] Custom building

    @replaywarrior: Go

    add me on msn or skype, i'll send you my work in progress and you can check out what i've been doing with the actual map.

    [email protected]

    superduperguy2 on skype

    Posted in: Terrain
  • 0

    posted a message on Roads Bugging

    @Beffyman: Go

    I assume this is a graphics card issue. Upload the map and i will try it. I have never seen this happen and i've had incredibly long roads....

    Posted in: Terrain
  • 0

    posted a message on [Feedback] Custom building

    @replaywarrior: Go

    but uh yeah, the neon tubes are a little excessive detail. Unless you're doing third person shooter it will enver be visible. It took me 10 minutes to even find it.

    Posted in: Terrain
  • 0

    posted a message on [Feedback] Custom building

    @replaywarrior: Go

    I love the interior wall supports idea! oh my god brilliance!

    Posted in: Terrain
  • 0

    posted a message on Life Support

    @TheSecretArts: Go

    LOL @ THIS I HAD A PC IN 1995 THAT WAS ALMOST AS FAST AS THAT XD

    Posted in: Off-Topic
  • 0

    posted a message on Dropships carrying vehicles

    @Colt556: Go

    in your load abilities you need to set cargo sizes. Example: set cargo space to 6 and set max cargo size to 1 and set the cargo size of all infantry to 1

    then in the vehicle one set cargo space to 4, set minimum cargo size and maximum cargo size to 4 as well and then set all vehicles to 4.

    Posted in: Data
  • 0

    posted a message on Help - water swamp effects

    @Excludos: Go

    even if it's only two textures it shouldnt look like just one flat sheet of filth.

    Posted in: Terrain
  • 0

    posted a message on Nutral Units and buildings

    @Selfcreation: Go

    in the data editor if you open up your structure for producing units there is a field titled interact that allows you to share the building. Look up biffu's item tutorial and watch that, it will show you how to make shared buildings.

    Posted in: Data
  • To post a comment, please or register a new account.