473,386 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What is the solution for error: redefinition of 'main' in C?

It gives me an error when I try to write another program on the same source file that I used for a program before. the error is error: redefinition of 'main'. What should I do?
Oct 1 '19 #1
2 3607
donbock
2,426 Expert 2GB
Most likely, your source file contains two functions named main. You can’t have two functions with the same name in the same source file.
Oct 2 '19 #2
dev7060
636 Expert 512MB
Also, you may need to check the source files that are being included in the current one.
Oct 12 '19 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: James M. Luongo | last post by:
Hello, I am having problems with the mail() function, but I don't know what the problems are. Here is a snippet of code: $to = "jmluongo@comcast.net"; $from = "Gallery@gafok.com";...
12
by: craig | last post by:
Quick question for the experts... Whenever I set the Image property of a PictureBox on one of my windows forms to a PNG graphic file on my hard drive, I get the following runtime error when I...
5
by: aspineux | last post by:
I want to parse 'foo@bare' or '<foot@bar>' and get the email address foo@bar the regex is r'<\w+@\w+>|\w+@\w+' now, I want to give it a name
3
by: oracle newbie | last post by:
What is error PLW 07204?
70
by: junky_fellow | last post by:
Guys, If main() calls some function func() and that function returns the error (errno), then does it make sense to return that value (errno) from main. (in case main can't proceed further) ? ...
4
by: Protoman | last post by:
Can you please help me figure out what the error is here, in this rotor cipher simulator, which I wrote to amuse myself? The runtime error is that it isn't symmetrical --decrypting a piece of...
1
by: okonita | last post by:
I need major help resolving a UDF error. My environment id DB2 UDBv8.2 and v9.1 on a Linux and Windows server. I am getting a SQL20148N error which states as follows: SQL20148N Routine...
4
by: Golard | last post by:
Hello, My project is actually in VB6 (Visual Studio 6) on XP. This project is Vista compatible, and has to stay XP compatible. I'm going to install VS2008 and migrate my project: First step, I...
6
by: Soorali | last post by:
Hi I am a newbie to VC++ and this is my first independent project so please pardon my ignorance!! My project compiles and runs perfectly fine in Debug mode. However, when I try to compile it...
2
by: vinaykumaar | last post by:
Hi here is the error I got after executing the program prog.c:12:5: error: redefinition of ‘main’ int main() { ^~~~ prog.c:3:5: note: previous definition of ‘main’ was here int...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.