Bloodshed DevC++ gives errors...

Status
Not open for further replies.

REY619

Ambassador of Buzz
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

Youngling
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;
    
}
 
OP
R

REY619

Ambassador of Buzz
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

Youngling
hmmm... 'I' dont think thats possible.. :(
lets see if others can answer ur ques.. (I'm also interested to kno the answer!! ;) )
 

rakeshishere

HELP AND SUPPORT
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

C# Be Sharp !
@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

Beware of the innocent
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?
 

mehulved

18 Till I Die............
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:

Zeeshan Quireshi

C# Be Sharp !
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++ ;)
 

mehulved

18 Till I Die............
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

C# Be Sharp !
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

in search of myself
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

C# Be Sharp !
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 .
 
OP
R

REY619

Ambassador of Buzz
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

C# Be Sharp !
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 .
 

sam_1710

Youngling
@Zeeshan:thanks for those C# tut links...
C# is (so simple)ⁿ compared to C/C++ !!! :)
THanks once again!!
 

abhi_10_20

Cool and Calm
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

Ambassador of Buzz
replace void with int. i guess gcc doesnt recognize void for main. also, remove .h for the header files. it is no longer needed.
 

dabster

In the zone
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.
 
Status
Not open for further replies.
Top Bottom