Visual studio c++ 2010

Im having problem with this program. in Dev-C++ i countered error that it doesent support long long, so i changed to visual studio, but now im gettign one error but ihave no idea what it is cause it doesent show me what error it is. Where can i see what error it is that it is giving me.
If you're asking what I think you are...Well, you have a tab in the bottom of the screen that's called "Error List". If you don't see that try clicking on View -> Error List, and then it should be visible ( again in the bottom of the screen ).

Happy coding!
im getting Error 2 error LNK1120: 1 unresolved external
and Error 1 error LNK2001: unresolved external symbol _mainCRTStartup
closed account (zb0S216C)
vastrolorde wrote:
im getting Error 2 error LNK1120: 1 unresolved external and Error 1 error LNK2001: unresolved external symbol _mainCRTStartup

You will need to post your code. Without the code, we cannot determine what's causing the issue. Since I use VCE 2010 myself, maybe I can help you.

Wazzak
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
#include <iostream>
#include <string>
#include <sstream>
using namespace std;

int long long fibo(int n);
string output_formatted_string(long long num);

int main (void) {
int n= 0;
cout << "Enter a number: ";
cin >> n;
string s = output_formatted_string(fibo(n));
cout << "Fibo(" << n << ") = " << s << endl;
system("PAUSE");
return 0;
}

long long fibo(int n)
{
if (n <2)
return 1;
long long temp1 = 1;
long long temp2= 2;
long long total = 0;
while (n-- > 1)
{
total = temp1 + temp2;
temp2 = temp1;
temp1 = total;
}
return total;
}

#define GROUP_SEP ','
#define GROUP_SIZE 3

string output_formatted_string(long long num){
stringstream temp, out;
temp << num;
string s = temp.str();

int n = s.size() % GROUP_SIZE;
int i =0;
if(n > 0 && s.size() > GROUP_SIZE){
out << s.substr(i, n) << GROUP_SEP;
i += n;
}

n = s.size() / GROUP_SIZE -1;
while (n-- > 0){
out << s.substr(i, GROUP_SIZE) << GROUP_SEP;
i += GROUP_SIZE;
}
out << s.substr(i);
return out.str();
}
closed account (zb0S216C)
Your main entry-point is fine. The issue must be within your project configuration. Your project must be setup for something other than a console. To fix this issue, try these instructions:

1)Go to: Project >> [Project Name] Properties.
2)At the top of the dialog box, select the All Configurations list item from the Configuration dropdown list.
3)Expand the Configuration Properties node on the left side.
4)Select the General child.
5)On the right-hand side, find the Configuration Type field.
6)Select the Application list item from the Configuration Type field.
7)Press the Apply button followed by the OK button.

Wazzak
Last edited on
it is on Application type.
closed account (zb0S216C)
Is your source file part of the project (listed under the Source Files filter)?

Wazzak
aaa, thanks got it working.
closed account (zb0S216C)
Since your problem was solved, if at all possible, could you post what you did to solve your issue? This way, other users with the same problem will be able to refer to this post for an answer.

Thanks.

Wazzak
place your code under the source files
Topic archived. No new replies allowed.