User Profile

Collapse

Profile Sidebar

Collapse
quophyie
quophyie
Last Activity: Mar 24 '08, 04:37 PM
Joined: Mar 21 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • quophyie
    replied to Using Structs from header file in cpp file
    in C
    I finally overcame this problem by defining the struct and class in a namespace in the header file and to get access to the struct and methods in the namespace from the cpp, I used the scope operator. I know that for some experts, this may be obvious but for us newbies, it can sometimes be mind boggling to get our heads around these things. Anyway here is the code.

    the header
    Code:
    #ifndef CARDS_H_
    #define
    ...
    See more | Go to post

    Leave a comment:


  • quophyie
    replied to Using Structs from header file in cpp file
    in C
    Sorry but I forgot to comment that ie.e. #include "Cards.h"ou t when I was posting the code. I still get errors when I compile even with the line commented out. Help!!
    See more | Go to post

    Leave a comment:


  • quophyie
    replied to Problem with including files
    in C
    Try #include "B\B1\B.h" instead (if you are uing windows). Using the"<>" symbols are is usually reserved for library header files...
    See more | Go to post

    Leave a comment:


  • quophyie
    started a topic Using Structs from header file in cpp file
    in C

    Using Structs from header file in cpp file

    Hi guys

    I''m a new C++ programmer and I am having a few problems with some structs that I have defined in my header file and want to use in my CPP file. The struct called "deck" is defined in a file called "Cards.h". In the corresponding CPP file called "Cards.cpp" when I try to use the struct "deck", I get a lot of errors from the compiler as displayed in my compiler errors below. I have tried...
    See more | Go to post
No activity results to display
Show More
Working...