Does Not Have Class Type Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn does not have class type qt more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users c++ class does not name a type Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping does not name a type c++ each other. Join them; it only takes a minute: Sign up does not have class type C++ up vote 10 down vote favorite 1 This is one class from my program! When I'm trying to compile the whole
C++ Classes
program, I get an error message like this: main.cpp:174: error: '((Scene*)this)->Scene::lake' does not have class type The source class Scene { int L,Dist; Background back ; Lake lake(int L); IceSkater iceskater(int Dist); public : Scene(int L, int Dist) { cout<<"Scene was just created"< here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up does not have class type up vote 1 down vote favorite Trying to iterate http://stackoverflow.com/questions/14143967/does-not-have-class-type-c through a vector in a class in C++ using: for(vector here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About http://stackoverflow.com/questions/19084356/c-does-not-have-a-class-type Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the http://forum.arduino.cc/index.php?topic=45419.0 Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up C++ does not have a class does not type up vote 0 down vote favorite my code is the following #include (read only) > Software > Syntax & Programs > C++ problem with classes Print Go Down Pages: [1] Topic: C++ problem with classes(Read 3798 times) previous topic - next topic Boa Newbie Posts: 3 Karma: 0[add] Arduino rocks C++ problem with classes May 24, 2008, 06:05 pm Last Edit: May 24, 2008, 10:56 pm by BoaReason: 1 Hey there,I'm doing my first steps in programming with C++. I already succeed in making a class that worked when I wrote a litlle test it. This class is called "Analoog"Now I want to use objects from this class to make another class, called Licht. I don't know why, but everytime I want to build the librarie he gives errors:Quote"Licht.cpp:27: error : '((Licht*)this -> Licht::seconde' does not have class type""Licht.cpp:32: error : '((Licht*)this -> Licht::groen' does not have class type"and"Licht.cpp:33: error : '((Licht*)this -> Licht::rood' does not have class type"I'm thinking there's something wrong with the way i'm initialising the class Objects... I tried many things, but everything gave errors.Does anybody see what I'm doing wrong?this is the header-file (.h) :Code: [Select]
/*
Auteur : Bo Knooren
*/
#ifndef Licht_h
#define Licht_h
#include "WConstants.h"
#include
#include
class Licht
{
public:
Licht();
boolean vanGroenNaarRood(int tijd, int aantalStappen);
private:
Analoog groen(int a);
Analoog rood(int b);
Metro seconde(int c); // houdt een 1 bij wanneer 1 seconde is gepasseerd
int counter; // telt de seconden
int teller; // telt de het aantal keer dat de leds een beetje van kleur veranderd zijn
};
#endif
this is the source file (.cpp) :Code: [Select]
/*
Auteur : Bo Knooren
*/
#include "WProgram.h"
#include "Licht.h"
Licht::Licht()
{
Metro seconde(1000);
Analoog groen(3);
Analoog rood(5);