473,406 Members | 2,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,406 software developers and data experts.

In the build of basic code, warning: control reaches end of non-void function

My compiler returns 0 errors and 1 warning, for the following code.

The warning is
warning: control reaches end of non-void function

what does this mean?

CODE
#include <stdio.h>

int main()
{
if ( 11 < 10) {
printf( "Five is now less than ten, that's a big surprise" );
}
else {
printf( "11 is now not less than ten, that's a big surprise" );
}
}

Many thanks
May 2 '11 #1
2 2247
donbock
2,426 Expert 2GB
You told the compiler that main returns an int value, but the function ends without a return statement. What int value should the compiler return?

The error message tells it all -- control reached the end (that is, the closing brace) of a non-void function (that is, a function that is supposed to return a value).
May 2 '11 #2
Thank you. Your help is much appreciated. As you can see, I'm starting to learn programming from the very start!
May 2 '11 #3

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

Similar topics

1
by: pei_world | last post by:
Does anyone know how to create a control work as ActiveX(OCX) control or OLE control that can be used in other non-.net application development? any other ways can do! please help! urgent!
6
by: Gordo | last post by:
Hi, I have written a number of server controls to build the company's intranet from data held in an Oracle database. Everything works well for the various navigation pages. However, the...
6
by: Tico Tech | last post by:
Hi: I have a question about the Microsoft Communications Control Version 6.0 from visual studio .net. I have this code: Dim Buffer As String Do Buffer = AxMSComm1.Input() //Error, it does...
2
by: sbweld | last post by:
Hello, I am using Powerpoint 2007 and have found an option to integrate visual basic code into the slides. I am building a standalone Kiosk and I want my powerpoint presentation to reset and go...
0
by: saptharishi123 | last post by:
please help me and anyone send vb code to control robot(back, front, right, left) using vb.and also to insert a video window to view video from tv tuner card,and if possible to show the status of...
1
by: AMK2701 | last post by:
Hi, I am just new at using this code, so have probably made a really simple mistake. My code works fine just in the sub form I created it, but when putting the sub form in the main form, the code...
3
by: bbatson | last post by:
New to visual basic; trying to teach myself. Here is very basic code I am using to try to fill a text box on my form after updating a box that selects an employee ID. Dim strsql As String strsql...
4
by: raaman rai | last post by:
guys, what is the idea to backup sql server databse via visual basic code. And i also want the code please.
2
by: paliko | last post by:
a Visual basic code for an online tax payment system
1
by: vinayreddy | last post by:
How to see visual basic code of ms access file inorder to change the path of the database resides. Please any body can provide solution for this.
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.