Annoying Error Messages

Jul 13, 2012 at 3:12pm
Ok, The code is supposed to display three rows of asterisks on the computer screen. The first row should contain one asterisk. The second row should have two and the third row should have three. My problem is not in the code (or maybe it is) but I am getting an error message.

Error 1 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup C: Error 2 error LNK1120: 1 unresolved externals C: 1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<iostream>
#include <iomanip>

using namespace std;
int main()
{
int row = 0;
const int asterisks = 0;

for (int row = 1; row < 4; row += 1)
{
	for (int asterisks = 1; asterisks <= row; asterisks += 1)
		cout << '*';
	//end for
	cout << endl;
}	//end for
return 0;
}


Would someone please help me with this? Thank you in advance.
Jul 13, 2012 at 3:19pm
You've picked the wrong kind of project in your super magic IDE. It thinks you're making some kind of Windows programme.

http://support.microsoft.com/kb/131204
Jul 13, 2012 at 3:38pm
Am I the only one who makes only empty projects in IDEs, and just set up whatever I need?
Jul 13, 2012 at 3:48pm
@ ResidentBiscuit: No. It's sad how we misuse our IDE's, isn't it?
Jul 13, 2012 at 5:51pm
I don't like the IDE doing weird things to my programs. And I've never had an issue related to just making an empty project. But I used to run into random problems all the time because I would make a premade project template.

I pretty much use my IDE as a text editor with a handy compiler haha.
Jul 13, 2012 at 5:56pm
^^^ +1 ResidentBiscuit

I very rarely even paste code in my compiler unless it's to test someone elses code. I like starting from scratch, it improves your knowledge on everything. I just started teaching someone how to program and we're only on our 4th simple program and he's already starting to type an entire program without looking at old code.
Jul 14, 2012 at 7:06am
@ ResidentBiscuit & Pulse: have you tried Geany?
On Windows, all you need to do is set up your paths to include your compiler.
It has some rough edges, though...
Jul 14, 2012 at 7:13am
I have not. I have found no reason to give up on Code::Blocks either. It has everything I want and then some. I just wish my IDE would make my netbook's resolution better =D

I thought Geany was a *NIX thing anyways...
Jul 14, 2012 at 7:17am
@Catfish,

Yea I've done it on Windows before, but I think it's way too convoluted. I just stick to C::B on Windows, and use Linux if I'm wanting to run from the command line. Basically, I can't stand Windows command prompt.
Jul 14, 2012 at 8:08am
There's a replacement for the Command Prompt...
http://sourceforge.net/projects/console/

And also many Unix utilities are available for Windows... such as wget.
The first major PITA is setting the paths. The second major PITA is when you have duplicate filenames, like make.exe, gaaah!
Jul 14, 2012 at 8:10am
From what I read about Geany, I believe the N++ program is similar. I know Geany is a dedicated IDE, but N++ is an amazing editor. I wish it had much better support for C++ syntax highlighting, but it's very fast for what it is, and I was also able to set it up so that my context menu, right click, would run/compile my programs for me.
Topic archived. No new replies allowed.