Not initiating class

When i go execute my code there is this one class it will not go to.
The class that wont work is the StandardForm class
The part of my main built for class going to each class
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
 cin>>Topic1;

if(Topic1=="Trigonometry"){

PlaceCursor(65, 7); printf("Trigonometry");
system("CLS");
Trigonometry Trigonometry;

   }
   else if(Topic1=="Pythagoras"){


   PlaceCursor(65, 7); printf("Pythagoras");
       system("CLS");
    Pythagoras Pythagoras;

}else if(Topic1=="StandardForm"){

PlaceCursor(65, 7); printf("Standard Form");
system("CLS");
StandardForm StandardForm;

}
else if(Topic1=="NumberBonds"){
        PlaceCursor(65, 7); printf("Number Bonds");
       system("CLS");
     NumberBonds NumberBonds;

}

   }while(Topic1!="Trigonometry"||"NumberBonds"||"Pythagoras"||"StandardForm");


    return 0;
}


Then here is my header and cpp file for Standard Form

StandardForm.cpp
1
2
3
4
5
6
7
8
#include "StandardForm.h"
#include <iostream>
using namespace std;
StandardForm::StandardForm()
{
cout<<"hello";
}

StandardForm.h
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef STANDARDFORM_H
#define STANDARDFORM_H


class StandardForm
{
    public:
        StandardForm();

};

#endif // STANDARDFORM_H 


For some reason why i enter to go to this class it just uses the System("CLS"); Command and thinks that Standardform is not part of the code.
Last edited on
Why are you doing StandardForm StandardForm as the name? To me that is like saying int int/double double/long long/ etc., but I know the compiler won't complain, but just makes the code look confusing imo.

Have you tried commenting out all the code to make sure the code for that works? I did and got this:

StandardForm
sh: 1: CLS: not found
Standard Formhello


Except for readability, I don't see anything wrong off hand.

Could you also explain why you are printing the names just to clear them right after?
Last edited on
Topic archived. No new replies allowed.