![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Programmer
Join Date: Oct 2005
Posts: 84
Rep Power: 3
![]() |
Missing Main In Allegro
Hi
I am learning allegro API but whenever i include "allegro.h" in mine code i get the following error Quote:
here is mine code #include <iostream>
#include <string>
#include <limits>
#include <vector>
#include <allegro.h>
using namespace std;
template< typename X >
X add(X t1,X t2)
{
return t1+t2;
}
int main()
{
string str1 = "umesh";
string str2 =" Rocks";
cout<<add(4,5)<<endl;
cout<<add(93.5,6.99)<<endl;
cout<<add(str1,str2)<<endl;
getchar();
cout<<endl;
cout<<endl;
int x =10;
return 0;
getchar();
}
__________________
"You're good... but me, I'm magic" Last edited by big_k105; Feb 20th, 2008 at 10:57 AM. Reason: Changed Code tags |
|
|
|
|
|
|
#2 |
|
Hobbyist
Join Date: Sep 2005
Posts: 259
Rep Power: 3
![]() |
Re: Missing Main In Allegro
Read the Allegro documentation. Some libraries require that 'main' have a specific signature. You may also be required to set the entry point.
If you just want to fumble about try: int main(int argc, char* argv[])
{
return 0;
} |
|
|
|
|
|
#3 |
|
Professional Programmer
|
Re: Missing Main In Allegro
http://www.loomsoft.net/resources/al...ut_lesson1.htm
"END_OF_MAIN() // This must be called right after the closing bracket of your MAIN function. // It is Allegro specific."
__________________
JG-Webdesign |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Return type - main() / ISO C standard | sharadpro | C | 2 | Mar 14th, 2007 6:02 AM |
| C# corruption!!! | Kilo | C++ | 32 | May 21st, 2006 8:44 PM |
| OOT Program Examples | Sane | Other Scripting Languages | 4 | Nov 25th, 2005 12:06 AM |
| noob questions about main() format | linuxpimp20 | C | 16 | Jul 11th, 2005 7:48 AM |
| Returning a value from a variable to the main function | colt | C | 3 | Apr 28th, 2005 7:56 AM |