Project is not compiled

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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#include <iostream>
#include <ctime>
#include <string>
#include <string.h>
#include <stdio.h>
int main()
{
    using namespace std;
    srand(time(NULL));
    short int iScore;
    short int eScore;
    iScore=0;//your score
    eScore=0;//opponent score
    short int iType;
    short int eType;
    double rundor;//amount of rounds
    short int stensaxpase;
    cout<<"                        *************************\n";
    cout<<"                        *     Sten Sax Pase     *\n";
    cout<<"                        *************************\n";//"header"
    cout<<endl;
    cout<<endl;
    cout<<endl;
    cout<<endl;
    cout<<endl;
    cout<<"Först till: ";//how many rounds?
    cin>>rundor;
    while (iScore<=rundor && eScore<=rundor);
    {
          eType = rand() / (RAND_MAX / 3 + 1) + 1;
          cout << "Sten sax eller pase?(1=sten,2=sax,3=pase)\n";
          cin>>iType;
          if (iType == 1)
          {
                   if (eType == 1)
                   {
                             cout<< "Lika!";
                             cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
                   }
                   else if (eType == 2)
                   {
                        cout<< "Du vann rundan!";
                        iScore=iScore+1;
                        cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
                   }
                   else if (eType == 3)
                   {
                        cout<<"Du förlorade rundan...";
                        eScore=eScore+1;
                        cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
                   }
                   else
                   {
                       cout<<"ERROR!";
                   }
          }
          else if (iType == 2)
          {
                   if (eType == 2)
                   {
                             cout<< "Lika!";  
                             cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
                   }
                   else if (eType == 3)
                   {
                        cout<< "Du vann rundan!";
                        iScore=iScore+1;
                        cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
                   }
                   else if (eType == 1)
                   {
                        cout<<"Du förlorade rundan...";
                        eScore=eScore+1;
                        cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
                   }
                   else
                   {
                       cout<<"ERROR!";
                   }
          }
          else if (iType == 3)
          {
                  if (eType == 3)
                   {
                             cout<< "Lika!";
                             cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
                   }
                   else if (eType == 1)
                   {
                        cout<< "Du vann rundan!";
                        iScore=iScore+1;
                        cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
                   }
                   else if (eType == 2)
                   {
                        cout<<"Du förlorade rundan...";
                        eScore=eScore+1;
                        cout<< "Du har "<<iScore<<"poang/nMotstandaren har "<<eScore<<"poang";
                   }
                   else
                   {
                       cout<<"ERROR!";
                   }
          }
          else
          {
              cout<<"Skriv 1 for sten, 2 för sax eller 3 för pase!";
          }
    }
    
    cin.ignore();
    cin.get();
}

When i thought the code was done,i compiled it said "linking" for a few seconds then done ( i was shocked that i didn't get any errors as i started coding a couple of days ago).
When i pressed ctrl+f10 it said "Project is not compiled" in a pop-up.
Im using dev-c++ if its for any help.

Thank you
/Xyexs
Last edited on
You need to post the actual error.
There is no error but when i press ctrl+10 (run) it says the program is not compiled...
Neeeed help here!!!
You need patience, sir. It's only about 9 in the morning in the area where the bulk of our regular members live.


Are you sure it's not spitting out any errors? I did a quick search for the issue at hand but couldn't find anything that didn't result in it actually having some errors.

edit: Also, dev-c++ is horribly out dated and you are unlikely to find experienced users here who can actively help you with that IDE.
Last edited on
¿can you show the build chain?
Test a hello world.


in the area where the bulk of our regular members live.
¿where's that?
North America/ South America. I could be wrong though. I was pretty sure the majority of us live In the US and Canada. With like 1 or 2 living in brazil.
ddnt work....

1
2
3
4
5
#include <iostream>
int main()
{
    cout << "hello world!"
}

.. i guess i'll get a new compiler...
Last edited on
That hello program is missing a semicolon on line 4.
You need using namespace std; after
#include <iostream> and what Peter87 said.
Last edited on
This compiled for me (The OP, not the Hello world) in VS2010. However, you have an infinite loop.
Topic archived. No new replies allowed.