CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: jopeters

Search: Search took 0.04 seconds.

  1. Replies
    5
    Views
    1,455

    Re: problem declaring a vector within a class

    Thank you for your insite
  2. Replies
    5
    Views
    1,455

    Re: problem declaring a vector within a class

    thank you Paul McKenzie, I made a silly mistake and forgot those underscores, but the program DOES run when I use "using namespace std;"
  3. Replies
    5
    Views
    1,455

    Re: problem declaring a vector within a class

    I've tried including #include <vector> at the top but it generates the same errors.

    When I add namespace std it fixes the previous errors but gives me the following error on my implementation...
  4. Replies
    5
    Views
    1,455

    problem declaring a vector within a class

    I'm trying to declare two vectors within the private section of a class "rover" I am working on.






    #ifndef ROVER_H
    #define ROVER_H
  5. in a pickle here with sorting and popping from a vector

    I am having problems with a series of sorting and deleting. The program is supposed to sort the names in a vector in a way that the "goose" is deleted. The "goose" is input by the user as a number...
  6. Re: eliminating an entry from a vector without changing the order

    solved the previous problem! thanks for all your help lindley you are the man.
  7. Re: eliminating an entry from a vector without changing the order

    you were right, it will compile but it crashes when the main calls the wackGoose function.



    void wackGoose(const vector<string>&names, int goose)
    //eliminates the gooseth entry over and over...
  8. Re: eliminating an entry from a vector without changing the order

    I thought you meant to pass them as follows:



    void wackGoose(const vector<string>&names, int goose);


    But when I do that I get the following compiler errors.

    Error 1 error LNK2001:...
  9. Re: eliminating an entry from a vector without changing the order

    thanks a ton that info will definitely be helpful. Unfortunately I cannot use the std::swap() function for this assignment due to restrictions from my professor. At this point I am less concerned...
  10. eliminating an entry from a vector without changing the order

    THE FIRST PART OF THIS IS BACKGROUND INFO ABOUT THE PROGRAM
    I'm trying to write a program that inputs names from a file into a vector. The user will enter a number greater than 0 to be the...
  11. Re: tic tac toe game, how to check if someone wins?

    ok thanks ill see what i can do
  12. Re: tic tac toe game, how to check if someone wins?

    I'm a little confused what you mean, what are the 0, 3, 6, etc representing?
  13. tic tac toe game, how to check if someone wins?

    I'm trying to write a tic tac toe game and can't figure out how to check and see if someone is the winner? I'm using a 2 dimensional array thats 3 by 3 (like a tic tac toe board) and all the "blank"...
  14. Replies
    1
    Views
    3,557

    Re: any ideas how to write this function?

    nevermind im on to something.
  15. Replies
    1
    Views
    3,557

    any ideas how to write this function?

    I need to write a function named:

    int getNumAccidents()

    the function is passed the names of a region within a city (north, south, east, west) The function also asks the user for the number...
  16. Replies
    5
    Views
    809

    Re: ifstream is not cooperating

    i tried the forward slashes and double back slashes and still got the same output =/
  17. Replies
    5
    Views
    809

    Re: ifstream is not cooperating

    also a side note, that not gunna be the full program, just that snippet.
  18. Replies
    5
    Views
    809

    ifstream is not cooperating

    int year;
    float population;

    ifstream fin;
    fin.open("C:\Users\Josh\Desktop\c++\people.dat");

    fin >> year >> population;

    cout << year << endl << population;
  19. Replies
    3
    Views
    3,176

    Re: illegal else without matching if

    the || in the first line of the if statement are actually supposed to be &&, i fixed that.
  20. Replies
    3
    Views
    3,176

    illegal else without matching if

    i thought my code was good but apparently not,

    if (average >= 0 || average <=100)
    else if (average >= 90) // <-- this is the line the error takes...
  21. newbie Q: how can you cout different strings based on what you cin?

    I'm trying to write a rather simple code, that allowed you to cin your name, and get something out of cout based on what you put in. Basically I want to have a response correlated to each of my...
Results 1 to 21 of 21





Click Here to Expand Forum to Full Width

Featured