circular main Main.o dependency dropped

Just as the Title states, im getting an error where Main.O dependency is dropped, and that I have a circular main, why wont it compile? Ive been fooling around with this for about 2 hrs now




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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include<iostream>

using namespace std;


char questionone, h, r, t;

void Start();
void GetResults();

void 
Start ()
{
    while(h > 0)
    {
                
                cout << "What Variables do you have? \n";
                cout << "1.Horsepower and RPM's? \n";
                cout << "2.Torque and RPMs? \n";
                cout << "3.Horse power and torque? \n";
                questionone = 0;
                
                cin >> questionone;
                
                switch (questionone)
                {
                       case '1' :
                            cout << "Please enter horsepower rating now \n";
                            h = 0;
                            
                            cin >> h;
                            
                            cout << "Please enter RPM's now \n";
                            cin >> r
                            
                            cout << "Your Torque is at " << ((5252 * h) / r) << endl << endl;
                            GetResults();
                            break;
                       
                       case '2' :
                            cout << "please enter Torque rating now \n"
                            t = 0;
                            
                            cin >> t;
                            
                            cout << "Please enter RPM rating now \n";
                            cin >> r;
                            
                            cout << "Your horsepower is " << ((t * r) / 5252) << endl << endl;
                            break;
                            
                       case '3' :
                            cout << "Please enter Horsepower \n";
                            h = 0;
                            
                            cin >> h;
                            
                            cout << "Please enter Torque now \n";
                            cin >> t;
                            
                            cout << "Your RPM's are at " << ((5252 * h) / t) << ednl << endl;
                            break;
                }
    }
}

              
int 

main()
{
    cout << "Horsepower, Torque, and RPM converter \n";
    Start();
    return 0;
}
closed account (z05DSL3A)
There are four errors that I can see
1) There is no implementation of void GetResults(); (called on line 37)
2) Line 34 missing an ;
3) Line 41 is missing an ;
4) typo on Line 61 - ednl
Last edited on
Well I fixed the errors and got rid of all the void GetResults(), and it still is circular

1
2
3
4
5
6
7
8
9
int 

main()
{
    cout << "Horsepower, Torque, and RPM converter \n";
    Start();
    system ("pause")// if I add this it will compile but do nothing but say the cout above
    return 0;
}


im soooo lost
Last edited on
closed account (z05DSL3A)
Hmm...Try creating a new project, sounds like somethings buggered up (not the code).
Well I got rid of the while loop and now it works and actually takes in variables... but... it wants to only take in one, then do the computing
...
its so confusing
because half of the time, its dividing by zero but still giving out an answer
You can see what I mean here
http://i549.photobucket.com/albums/ii370/Flash41000/Capture.png
closed account (z05DSL3A)
For that problem, read Zaita's post: Using cin to get user input.
http://www.cplusplus.com/forum/articles/6046/
Thanks Grey Wolf, for all the help
Topic archived. No new replies allowed.