 |
14-07-2007, 03:02 PM
|
#1 (permalink)
|
|
~[::BOoYaKa::]~
Join Date: May 2005
Location: In a Cave.
Posts: 575
|
Bloodshed DevC++ gives errors...
Hi people , i have just started using Bloodshed DevC++ 4.9.9.2 to write and compile the C/C++ programs. The problem is that its giving errors when there is no error in the program.... For example look at this program....
Code:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
cout<<"Blah";
}
It is the most simple program but it is still giving 3 errors in this program.
Code:
1. `main' must return `int' In function `int main(...)':
2. clrscr' undeclared (first use this function)
3. Each undeclared identifier is reported only once for each function it appears in.)
Whereas the same program works fine in the TurboC3(DOS based) compiler...
Can someone tell me how to make programs run in BloodShed?? Any user of bloodshed can help me as it may require to change some settings in it...
Thanx...
__________________
[::Eddie n Benoit Live Forever::]
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
14-07-2007, 03:22 PM
|
#2 (permalink)
|
|
Alpha Geek
Join Date: May 2006
Posts: 755
|
Re: Bloodshed DevC++ gives errors...
According to the guys at bloodshed software, users wudn't require a clrscr() ..  so u cant use it..
instead use
at the end of your program..
Here's da prg..
Code:
#include<iostream.h>
#include<conio.h>
main()
{
//clrscr();
cout<<"Blah";
fflush(stdout);
return 0;
}
__________________
C2D E8400, MSI P45 Neo-F, Sapphire HD4850, Dell 2409W, OCZ 2*1GB RAM + 1*2GB Transcend + 1*1GB Transcend , Seagate 1TB + 2*Seagate 80GB, 600W SMPS, APC 600VA, Creative EP630, Sennheiser HD202 :)
|
|
|
14-07-2007, 04:09 PM
|
#3 (permalink)
|
|
~[::BOoYaKa::]~
Join Date: May 2005
Location: In a Cave.
Posts: 575
|
Re: Bloodshed DevC++ gives errors...
Thanx sam its working now!! 
One more question though, when we run a program its shown in DOS window, how can we make programs in GUI windows interface, using BloodShed?
Thanx..
__________________
[::Eddie n Benoit Live Forever::]
|
|
|
14-07-2007, 04:12 PM
|
#4 (permalink)
|
|
Alpha Geek
Join Date: May 2006
Posts: 755
|
Re: Bloodshed DevC++ gives errors...
hmmm... 'I' dont think thats possible.. 
lets see if others can answer ur ques.. (I'm also interested to kno the answer!!  )
__________________
C2D E8400, MSI P45 Neo-F, Sapphire HD4850, Dell 2409W, OCZ 2*1GB RAM + 1*2GB Transcend + 1*1GB Transcend , Seagate 1TB + 2*Seagate 80GB, 600W SMPS, APC 600VA, Creative EP630, Sennheiser HD202 :)
|
|
|
14-07-2007, 04:18 PM
|
#5 (permalink)
|
|
HELP AND SUPPORT
Join Date: Jun 2006
Posts: 1,603
|
Re: Bloodshed DevC++ gives errors...
Quote:
|
Originally Posted by REY619
Thanx sam its working now!! 
One more question though, when we run a program its shown in DOS window, how can we make programs in GUI windows interface, using BloodShed?
Thanx..
|
U need to Learn on Using Gfx in C/C++
|
|
|
14-07-2007, 04:21 PM
|
#6 (permalink)
|
|
C# Be Sharp !
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
|
Re: Bloodshed DevC++ gives errors...
@REY Bloodshed Dev C++ is an abandoned project now , i recommend you use Visual Studio 2005 Express Edition for C++ Development . It is Free and much better than DevC++.
http://msdn.microsoft.com/vstudio/express/visualc/
Also , the C++ program you've written is according to te OLD C++ specification and is not STANDARD C++ . the program in Standard C++ would be
Code:
#include<iostream>
using namespace std;
int main()
{
//Your code
return 0; //If everything goes well
}
The header file Conio.h is a Borland specific file and will not compile on any other compiler than those from borland so you better not use it and do your work in Standard C++ , which compiles on all compilers .
@SAM,REY , well programming a GUI app in C++ is quite a time consuming task . You'll have to learn Win32API at the very least before you can start out even wih the most basic GUI programs .
thus , i suggest you use Visual C# Express
http://msdn.microsoft.com/vstudio/express/visualcsharp/ .
C# is a much easier and Object Oriented programing language and you can easily program GUI and CLI apps with C# .
you can start learning C# from Microsoft Visual Studio Beginner Developer Learning Center:
http://msdn.microsoft.com/vstudio/express/beginner/
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
|
|
|
14-07-2007, 04:27 PM
|
#7 (permalink)
|
|
Beware of the innocent
Join Date: Dec 2005
Posts: 1,024
|
Re: Bloodshed DevC++ gives errors...
yeah, gui programming in c++ is no small affair, though it is quite interesting. If you are willing to make the investment of time to learn and gain expertise, it is quite useful.
By the way, is bloodshed C++ abandoned? That was a nice project. Why so?
__________________
Life is too short. Have fun.
|
|
|
14-07-2007, 04:34 PM
|
#8 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: Bloodshed DevC++ gives errors...
zeeshan can you give me a link which says dev c++ is abandoned? I tried searching their mailing lists and forums without anything useful.
WIkipedia and the FAQ inform me that only the linux port of dev c++ is abandoned.
And qt can be used for developing GUI applications in c++ na?
Last edited by mehulved; 14-07-2007 at 04:34 PM.
Reason: Automerged Doublepost
|
|
|
14-07-2007, 04:35 PM
|
#9 (permalink)
|
|
C# Be Sharp !
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
|
Re: Bloodshed DevC++ gives errors...
Quote:
|
Originally Posted by mehulved
zeeshan can you give me a link which says dev c++ is abandoned? I tried searching their mailing lists and forums without anything useful.
WIkipedia and the FAQ inform me that only the linux port of dev c++ is abandoned.
And qt can be used for developing GUI applications in c++ na?
|
well there has been no stable or development release of DevC++ since Feab 22 2005
http://sourceforge.net/project/showf...group_id=10639
but still , the correct term would be "dead" if not "abandoned" .
PS: i think they shickened out after MS released Visual Studio Express which is much better than DevC++
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
|
|
|
14-07-2007, 04:37 PM
|
#10 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: Bloodshed DevC++ gives errors...
OK. I don't know how good it is as compared to VS, but I had heard good things about it. Still mingw is there on windows fortunately for windows users.
|
|
|
14-07-2007, 04:41 PM
|
#11 (permalink)
|
|
C# Be Sharp !
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
|
Re: Bloodshed DevC++ gives errors...
Quote:
|
Originally Posted by mehulved
OK. I don't know how good it is as compared to VS, but I had heard good things about it. Still mingw is there on windows fortunately for windows users.
|
Users can use anything they want , but Visual Studio Express bundles the compiler , IDE and all other necessary utilities into a simple install with a good UI .
so it's perfect for beginners . and wen they develop proficiency in C++(or any othe supported language) then they can start thinking about cross-platform code .
Anyways , C# is much much beter than C++ for beginners and most tasks and it is supported on both Windows and Linux .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
|
|
|
14-07-2007, 04:42 PM
|
#12 (permalink)
|
|
in search of myself
Join Date: Sep 2006
Location: Gurgaon
Posts: 1,720
|
Re: Bloodshed DevC++ gives errors...
Quote:
|
Originally Posted by REY619
Thanx sam its working now!! 
One more question though, when we run a program its shown in DOS window, how can we make programs in GUI windows interface, using BloodShed?
Thanx..
|
try this forgers win32 tutorial very simple and easy for newbie but its in c not c++
http://www.winprog.org/tutorial/
or alternatively you can use book
Windows Programming By Charles Petzold
W.P. Publishers and distributors
__________________
::::::::::::::::::::
Unban Praka123
::::::::::::::::::::
Vista is my Secretary | Mac is my Girlfriend | Linux is my Wife
"Ek Se Mera Kya Hoga" :lol:
|
|
|
14-07-2007, 04:44 PM
|
#13 (permalink)
|
|
C# Be Sharp !
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
|
Re: Bloodshed DevC++ gives errors...
Quote:
|
Originally Posted by jugnu_009
|
man , looking at the problem that REY is facing i don't think he can start out GUI programming with C++ yet .
@REY it's better you use Visual C# for learning and GUI apps which from my personal experience is a lot better and easier too .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
|
|
|
14-07-2007, 04:55 PM
|
#14 (permalink)
|
|
~[::BOoYaKa::]~
Join Date: May 2005
Location: In a Cave.
Posts: 575
|
Re: Bloodshed DevC++ gives errors...
Thanx a lot people for all your help and replies...
@Zeeshan should i download Visual C# 2005 or Visual C++ 2005??? Cos i also have to do a lot of C++ programming apart from GUI developing...
__________________
[::Eddie n Benoit Live Forever::]
|
|
|
14-07-2007, 05:05 PM
|
#15 (permalink)
|
|
C# Be Sharp !
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
|
Re: Bloodshed DevC++ gives errors...
Quote:
|
Originally Posted by REY619
Thanx a lot people for all your help and replies...
@Zeeshan should i download Visual C# 2005 or Visual C++ 2005??? Cos i also have to do a lot of C++ programming apart from GUI developing...
|
Well YOu can do most of the stuff in C# that you can do in C++ so VIsual C# Express would be best .
but if you really need to program in both of these languages then you can download both of them and as each IDE is just 400MB so total download will be less than <1GB .
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
|
|
|
14-07-2007, 05:08 PM
|
#16 (permalink)
|
|
~[::BOoYaKa::]~
Join Date: May 2005
Location: In a Cave.
Posts: 575
|
Re: Bloodshed DevC++ gives errors...
OK Thanx a ton for your help!! It will help a lot... 
Thanx again...
__________________
[::Eddie n Benoit Live Forever::]
|
|
|
14-07-2007, 05:45 PM
|
#17 (permalink)
|
|
Alpha Geek
Join Date: May 2006
Posts: 755
|
Re: Bloodshed DevC++ gives errors...
@Zeeshan:thanks for those C# tut links...
C# is (so simple)ⁿ compared to C/C++ !!! 
THanks once again!!
__________________
C2D E8400, MSI P45 Neo-F, Sapphire HD4850, Dell 2409W, OCZ 2*1GB RAM + 1*2GB Transcend + 1*1GB Transcend , Seagate 1TB + 2*Seagate 80GB, 600W SMPS, APC 600VA, Creative EP630, Sennheiser HD202 :)
|
|
|
14-07-2007, 06:33 PM
|
#18 (permalink)
|
|
Cool and Calm
Join Date: Jul 2006
Location: Bangalore
Posts: 406
|
Re: Bloodshed DevC++ gives errors...
i still am havin an age old problm.....
wen i run turbo c, "ntvdm.exe" (its a process) takes all cpu(100% cpu usage)
and literally hangs my comp...
still not able to figure out a problem...
__________________
When Roger's at play, opponents pray..!!!!! :twisted:
|
|
|
14-07-2007, 08:12 PM
|
#19 (permalink)
|
|
Alpha Geek
Join Date: Jan 2006
Location: Middle Earth
Posts: 503
|
Re: Bloodshed DevC++ gives errors...
replace void with int. i guess gcc doesnt recognize void for main. also, remove .h for the header files. it is no longer needed.
|
|
|
15-07-2007, 10:11 AM
|
#20 (permalink)
|
|
In The Zone
Join Date: Jul 2005
Posts: 363
|
Re: Bloodshed DevC++ gives errors...
Quote:
|
Originally Posted by abhi_10_20
i still am havin an age old problm.....
wen i run turbo c, "ntvdm.exe" (its a process) takes all cpu(100% cpu usage)
and literally hangs my comp...
still not able to figure out a problem...
|
My best Bet for C++ programming using easyeclipse ( http://www.easyeclipse.org/) on a Linux Box, but if somebody wants they can install the easyeclipse or CDT ( http://www.eclipse.org/cdt/) on windows also.
|
|
|
15-07-2007, 10:26 AM
|
#21 (permalink)
|
|
C# Be Sharp !
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
|
Re: Bloodshed DevC++ gives errors...
Quote:
|
Originally Posted by dabster
|
Nah , give VIsual C++ 2005 Express a try and you *might* change your mind(although eclipse ia great project but i think it is too overwhelming for beginners)
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
|
|
|
15-07-2007, 10:51 AM
|
#22 (permalink)
|
|
Beware of the innocent
Join Date: Dec 2005
Posts: 1,024
|
Re: Bloodshed DevC++ gives errors...
I think it would be ok to say that if you are using windows and prefer a simpler ready to use ide, ms vs is great. I myself rather prefer using things like devcpp since solving errors is fun in itself and helps me a lot of stuff about the innards.
But MS has done a good job with MS VS. I am fanatical about neither. Depends on your bent actually. For complete noobs, definitely ms vs. No point going for devcpp and the like. But would definitely recommend trying it out for a week atleast once you are comfortable with MS VS. You won't regret the experience.
__________________
Life is too short. Have fun.
|
|
|
15-07-2007, 12:13 PM
|
#23 (permalink)
|
|
In The Zone
Join Date: Jul 2005
Posts: 363
|
Re: Bloodshed DevC++ gives errors...
Quote:
|
Originally Posted by Zeeshan Quireshi
overwhelming for beginners
|
That's why i said to try easyeclipse(not the full eclipse), that's the best and fast IDE, and can be easily extended based on requirement. check it here
http://www.easyeclipse.org/site/dist...cplusplus.html
|
|
|
15-07-2007, 12:32 PM
|
#24 (permalink)
|
|
Broken In
Join Date: Apr 2005
Posts: 133
|
Re: Bloodshed DevC++ gives errors...
Hey, you don't need to use that .h after iostream and conio and graphics.h are not included by default in DEv c++
And for using cout you need to give using namespace std; command. before main().
void main() is not allowed...try int main(0 and therefore necessarily return it.
for getch(); you can use system("pause") which is a dos command for the same.
WIN32 API programming is quite vast and it takes quite some time to learn it. It is applied in C and not C++. C++ is used for OOPS. in wikipedia try and go through their book shelf and read the windows 32 programming sheet..You'll get to know more about it.
Also I feel at this stage it perfectly alright to use Bloodshed C++, since it is free and has quite a lot of features. You can use Open GL , directx and do 3d programs etc. I haven't used MS VS, but i prefer bloodshed since it is free.
For conio.h you can visit the following link.
http://www14.brinkster.com/aditsu/console/
If you search at sourceforge.net you can get a link for graphics.h also.
For win32 tutorial you can go here: http://www.relisoft.com/win32/index.htm
Thanks and bye
__________________
Abhishek Bhattacharya
|
|
|
15-07-2007, 01:45 PM
|
#25 (permalink)
|
|
~[::BOoYaKa::]~
Join Date: May 2005
Location: In a Cave.
Posts: 575
|
Re: Bloodshed DevC++ gives errors...
Thanx!!
__________________
[::Eddie n Benoit Live Forever::]
|
|
|
15-07-2007, 04:45 PM
|
#26 (permalink)
|
|
Beware of the innocent
Join Date: Dec 2005
Posts: 1,024
|
Re: Bloodshed DevC++ gives errors...
You can use win32 programming in C++ using OOPS. Implementation is a bit different though, but the same calls apply. Heck, you can use Win32 in Visual Basic and in any language on the windows platform.
__________________
Life is too short. Have fun.
|
|
|
15-07-2007, 06:54 PM
|
#27 (permalink)
|
|
C# Be Sharp !
Join Date: Jun 2006
Location: Toronto
Posts: 1,805
|
Re: Bloodshed DevC++ gives errors...
@Abhishek , visual Studio 205 Express is the FREE version of Visual Studio for learning and hobbyist purposes .
@ilugd , yups i totally agree , once you're at ease with the language you should explore the innards to gain more experience and by chance stumble on something useful
__________________
There are 10 types of people in the world: those who understand binary and those who do not.
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|