Search:

Type: Posts; User: Sclorch

Search: Search took 0.01 seconds.

  1. John is just a quickly typed example of the sort...

    John is just a quickly typed example of the sort of problem I am having in my game (I didn't want to post hundreds of lines of source code you know what I mean...?) yes I do need to make the said...
  2. Shouldn't making it 'extern' relieve the...

    Shouldn't making it 'extern' relieve the necessity of having to pass it through the talk function? (Since its now global?)

    Indented for you! :D
  3. Ok I've added the 'extern person john' part....

    Ok I've added the 'extern person john' part. Still getting an error :(
    Here's the updated header file:



    //classH.h
    #ifndef CLASS_H
    #define CLASS_H

    #include <string>
  4. Ahh I see now :) Thank you both

    Ahh I see now :)

    Thank you both
  5. Problem with accessing an object's member variable with one of my cpp files.

    The main problem is with the classCPP.cpp file. I am trying to access the member variable "personName" of the object "john." (of class person) Since "john" is not declared in this cpp it gives me an...
  6. Replies
    9
    Views
    2,138

    Cool I wrote a small program that uses 2 cpp and...

    Cool I wrote a small program that uses 2 cpp and 1 new h file that I wrote. Working great so far! thanks
  7. Replies
    9
    Views
    2,138

    Yep, am I wrong in assuming that the compiler...

    Yep, am I wrong in assuming that the compiler will just link all of my files in a project together for me? Or do I have to manually link them all together?

    Here were the steps I took:

    Created...
  8. Replies
    9
    Views
    2,138

    ok thanks, i thought it would be something that...

    ok thanks, i thought it would be something that had to do with the linker.
  9. Replies
    9
    Views
    2,138

    Thank you both for the quick reply. Still getting...

    Thank you both for the quick reply. Still getting errors though strangely. I've updated functions.cpp so now it looks like this



    #include <iostream>
    #include "functions.h"

    using namespace...
  10. Replies
    9
    Views
    2,138

    Help with multiple cpp files

    I'm having problems getting any programs with multiple cpp files to compile. I am using Dev-C++.
    Here are my files:


    //main.cpp
    #include <iostream>
    #include "functions.h"

    using namespace...
  11. Thank you!

    Thank you!
  12. Class with pointers to other classes as member data.

    I am writing a game where a certain location will point to a creature which resides there and also the creature points to the location where it is located. I am running into problems however because...
  13. Replies
    4
    Views
    3,238

    You were right, thanks anon! Here is updated...

    You were right, thanks anon!

    Here is updated code that works great for my save game function in my game just in case anyone has similar problems to this in the future and stumbles upon this on the...
  14. Replies
    4
    Views
    3,238

    Problem opening blank files with ifstream.

    I'm having problems opening blank files with ifstream. It seems to be saving a blank line over my first string variable. For example I created a completely blank text file in notepad and saved it as...
Results 1 to 14 of 14