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

Need help in this program.

Hi , I dont know what's wrong in this code, there is are 2 red "x" on left side of the program written,how do i fix them b'coz of it the program doesn't build & I m new to c++ and i use eclipse.



Attached Images
File Type: jpg sCapture.jpg (45.4 KB, 407 views)
Dec 20 '13 #1
3 1501
weaknessforcats
9,208 Expert Mod 8TB
You are using the clrscr() function which is non-standard in C++.

Better to include stdlib.h and use system("cls").
Dec 20 '13 #2
donbock
2,426 Expert 2GB
There is a legitimate case to be made either way in the clrscr() vs system("cls") debate. Another option is to send a bunch of newlines to cout.

Whichever way you choose to go is nonportable in some manner:
  • some platforms may not provide a clrscr() function
  • some platforms may use a different system command than cls to clear the screen
  • some platforms may need more newlines to clear the entire screen.
Dec 20 '13 #3
The other error you see is basically saying that the return type of main has to be an
Expand|Select|Wrap|Line Numbers
  1. int
.
Dec 27 '13 #4

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

Similar topics

1
by: - Just Me - | last post by:
It's been 15 years since I did any Basic programming, so I was wondering if I could get some help. I want to display the contents of a .txt file in real-time as the file is updated. I don't want...
1
by: me | last post by:
I have been looking online for a year, and cant find one. I used to use the int86() command in dos command-line mode, but it can't work in linux. I am using Allegro to make my program work, but I...
0
by: biganimal | last post by:
I have a program and I want the program to be able to save question/answers so the program actually gets smarter without getting amnesia everytime its started. Can anyone help??? # questor.py ...
1
by: vinoda2005 | last post by:
Hi Everybody, Can anyone send me the java code for printing the series like.. 1 + 1/2! + 1/4! + 1/8! +....+(N terms). I also need program to print the out put like: if 123 isthe input...
3
by: experience89 | last post by:
HI__plz help me people i need a visual basic program which calculates the arithmetical avarage (like 3+4/2=3.5) it's very urgent please help me!!!!!!! my mail adress is <removed as per site...
2
by: dfluker | last post by:
I need to write a java application that finds the smallest of several integers. I need it to prompt the user for the number of integers that will be input, then prompt the user for that number of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.