DIGIT-ARC read-only archive · snapshot: July 23, 2026

Bloodshed DevC++ gives errors...

27 posts · originally from https://geek.digit.in/community/threads/bloodshed-devc-gives-errors.62941/

R
REY619 Original post #1
Jul 14, 2007 at 3:02 PM
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...
sam_1710
Jul 14, 2007 at 3:22 PM
According to the guys at bloodshed software, users wudn't require a clrscr() .. :) so u cant use it..
instead use
Code:
fflush(stdout);
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;
    
}
R
REY619 #3
Jul 14, 2007 at 4:09 PM
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..
sam_1710
Jul 14, 2007 at 4:12 PM
hmmm... 'I' dont think thats possible.. :(
lets see if others can answer ur ques.. (I'm also interested to kno the answer!! ;) )
rakeshishere
Jul 14, 2007 at 4:18 PM
REY619 said:
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++
Zeeshan Quireshi
Jul 14, 2007 at 4:21 PM
@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++.

*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

*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:

*msdn.microsoft.com/vstudio/express/beginner/
ilugd
ilugd #7
Jul 14, 2007 at 4:27 PM
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?
M
Jul 14, 2007 at 4:34 PM
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?
Zeeshan Quireshi
Jul 14, 2007 at 4:35 PM
mehulved said:
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

*sourceforge.net/project/showfiles.php?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++ ;)
M
mehulved #10
Jul 14, 2007 at 4:37 PM
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.
Zeeshan Quireshi
Jul 14, 2007 at 4:41 PM
mehulved said:
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 .
CadCrazy
CadCrazy #12
Jul 14, 2007 at 4:42 PM
REY619 said:
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++

*www.winprog.org/tutorial/

or alternatively you can use book
Windows Programming By Charles Petzold
W.P. Publishers and distributors
Zeeshan Quireshi
Jul 14, 2007 at 4:44 PM
jugnu_009 said:
try this forgers win32 tutorial very simple and easy for newbie but its in c not c++

*www.winprog.org/tutorial/
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 .
R
REY619 #14
Jul 14, 2007 at 4:55 PM
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...
Zeeshan Quireshi
Jul 14, 2007 at 5:05 PM
REY619 said:
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 .
R
REY619 #16
Jul 14, 2007 at 5:08 PM
OK Thanx a ton for your help!! It will help a lot... :)
Thanx again...
sam_1710
sam_1710 #17
Jul 14, 2007 at 5:45 PM
@Zeeshan:thanks for those C# tut links...
C# is (so simple)ⁿ compared to C/C++ !!! :)
THanks once again!!
abhi_10_20
Jul 14, 2007 at 6:33 PM
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...
saurabh.sauron
Jul 14, 2007 at 8:12 PM
replace void with int. i guess gcc doesnt recognize void for main. also, remove .h for the header files. it is no longer needed.
D
dabster #20
Jul 15, 2007 at 10:11 AM
abhi_10_20 said:
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 (*www.easyeclipse.org/) on a Linux Box, but if somebody wants they can install the easyeclipse or CDT (*www.eclipse.org/cdt/) on windows also.
Zeeshan Quireshi
Jul 15, 2007 at 10:26 AM
dabster said:
My best Bet for C++ programming using easyeclipse (*www.easyeclipse.org/) on a Linux Box, but if somebody wants they can install the easyeclipse or CDT (*www.eclipse.org/cdt/) on windows also.
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)
ilugd
ilugd #22
Jul 15, 2007 at 10:51 AM
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.
D
dabster #23
Jul 15, 2007 at 12:13 PM
Zeeshan Quireshi said:
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
*www.easyeclipse.org/site/distributions/cplusplus.html
A
Jul 15, 2007 at 12:32 PM
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.
*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: *www.relisoft.com/win32/index.htm

Thanks and bye
R
REY619 #25
Jul 15, 2007 at 1:45 PM
Thanx!! :)
ilugd
ilugd #26
Jul 15, 2007 at 4:45 PM
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.
Zeeshan Quireshi
Jul 15, 2007 at 6:54 PM
@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 :)