473,386 Members | 1,835 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.

expression syntax

this is my program which brings me syntax expression.,help me
Expand|Select|Wrap|Line Numbers
  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main()
  4. {
  5. int x;
  6. cout<<"enter number"<<endl;
  7. cin>>x;
  8. cout<<"number entered is:"<<endl;
  9. getch();
  10. }
Nov 16 '12 #1
3 2062
PreethiGowri
126 64KB
use int main() instead of void,
since most of the editors does not support void
Nov 16 '12 #2
Banfa
9,065 Expert Mod 8TB
I don't know what "syntax expression" means but if you are getting compiler errors then copy and paste the entire error as it appears.

Use int main() instead of void main() but not because of editor incompatibility but rather because in C++ void main() produces undefined behaviour which should be avoided.
Nov 16 '12 #3
weaknessforcats
9,208 Expert Mod 8TB
Depending upon how old your compiler is, there were versions long ago that used iostream.h but also implemented namespaces. You may be missing a using namespace std; declaration.

The old compilers were Unix/Linux only.
Nov 18 '12 #4

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

Similar topics

18
by: Tim Marsden | last post by:
Hi, Can you tell me the regular expression syntax needed to validate an Excel Cell Reference. e.g. A1, B1200, IV54000 etc Thank Tim
11
by: JV | last post by:
I just converted a big web project from VB.NET to C# and I got some very strange runtime errors. Apparently, throughout the ASPX pages, the VB version of this project used the expression <%#...
1
by: Sreedhar Vankayala | last post by:
Hi, I have a simple textbox in a form page. - If data not available, then user can enter the text "Not available" or "Contact abc person". - If data is available, then user enters the data...
4
by: clintonG | last post by:
I'm not getting the hang of what I thought I already understood. Maybe burnout? I want to build a string in code and write it into the HTML for display... // initiliazed in code string someText...
1
by: richardkreidl | last post by:
Two questions, first I'm using CR 10 and connecting to a Sybase database. I don't see a 'Add Command' button in the 'Database Expert' dialog. Second is how would I correctly code the syntax for...
7
by: Hexer | last post by:
Hi and good day to all...I am new to the C language and whenever I tried to run the program I made, it won't because it says it has an "expression syntax error in function main"..what I don't get is...
3
by: seberino | last post by:
How similar is Python's re module (regular expressions) compared to Perl's and grep's regular expression syntaxes? I really hope regular expression syntax is sufficiently standardized that we...
1
by: AAaron123 | last post by:
I found this on the Internet and tried a few of them and they worked in VS2008. Actually it was in a different form but I converted to make a smaller file. The data is the same as the original. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
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
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.