Questions tagged [dev-c++]

A free, open-source, portable and extensible C/C++ IDE. Old Bloodshed versions are buggy and ship with a very outdated GCC compiler. Do yourself a favor: don't use the old versions. See "info" for alternatives.

Between 2011 and 2015, Orwell, a developer independent from Bloodshed (the original developers of Dev-C++), released improved and updated versions of Dev-C++. Therefore, it is not recommended to stick with the old Bloodshed Dev-C++ versions. Consider upgrading to for example:

  • Orwell Dev-C++ is free, open-source, ships with a 64bit compiler including less outdated resources like the Windows 7 API, and can be made fully portable with zero effort. However, it's not actively maintained and has no support for the last 3 C++ standards (14/17/20)

  • Embarcadero Dev-C++ is a modern fork of Bloodshed Dev-C++ and Orwell Dev-C++.

  • Microsoft offers a freeware version of their excellent Visual Studio IDE.

  • NetBeans, free, open-source, cross-platform IDE (see "C and C++ Development")

  • Qt Creator is a free, open-source, cross-platform IDE for building C++ applications.

  • Code::Blocks is often hailed as the obvious replacement for Dev-C++. It is free, open-source, cross-platform, and can be extended with plugins.

  • Eclipse is also a free, open-source, cross-platform IDE with pretty robust C++ support.

And of course, countless others are available.

So do yourself and everyone else a favor: Don't use the unmaintained Dev-C++, and certainly not the ancient Bloodshed Dev-C++.

941 questions
33
votes
7 answers

How to change mode from c++98 mode in Dev-C++ to a mode that supports C++0x (range based for)?

I am just learning how to write range based for loops, but the only problem is that my compiler, Orwell Dev-C++ doesn't seem to support it in its default mode (which is c++98). How can I change this mode to another one that supports this feature…
Victor Odouard
  • 1,345
  • 3
  • 15
  • 28
24
votes
8 answers

Get current username in C++ on Windows

I am attempting to create a program that retrieves the current user's username on Windows using C++. I tried this: char *userName = getenv("LOGNAME"); stringstream ss; string userNameString; ss << userName; ss >> userNameString; cout << "Username: "…
Andrew
  • 479
  • 1
  • 5
  • 13
21
votes
10 answers

Source file not compiled Dev C++

I just installed Dev C++ and I am learning C programming. the code i used was #include int main() { printf("Hello world"); getch(); } I saved it as a .c file. When I compile it works fine, but when I compile and run it says…
BaidNation
  • 387
  • 1
  • 2
  • 10
20
votes
1 answer

Compile 64-bit binary with MinGW (Dev-C++)

It is probably a stupid question but i was searching for the answer from about 3h. ¿How to compile 64-bit binary with (Dev-C++) MinGW? I have readed that MinGW support 64bits by default, but i am unable to active this option. I have tryed "-m64"…
Adrian Maire
  • 14,354
  • 9
  • 45
  • 85
18
votes
3 answers

integer constant is too large for "long" type

Possible Duplicate: long long in C/C++ Writing a simple program for a project Euler problem. Refuses to compile because "integer constant is too large for "long" type", even though it should be well within the size limits of an unsigned long…
Bacu
  • 539
  • 2
  • 4
  • 12
17
votes
5 answers

Dev C in Windows 8: gcc Internal Error

I am a teacher's assistant for a C programming class, and the instructor uses Dev C++ as the compiler for the class. Personally I would use a different one, but the choice is not mine here. Recently I installed the Windows 8 Professional 64 bit that…
boddie
  • 267
  • 2
  • 3
  • 9
16
votes
3 answers

Microsoft Visual C++, compiling small source codes without project file

Well, I've been using Dev-C++ for a while for learning the language [c++], and some stuff wouldn't work properly, like global and local variables. Then I decided to download Microsoft Visual C++ to see how it compared, and it was absolutely great;…
user535758
  • 163
  • 1
  • 1
  • 4
15
votes
9 answers

Repeated Multiple Definition Errors from including same header in multiple cpps

So, no matter what I seem to do, I cannot seem to avoid having Dev C++ spew out numerous Multiple Definition errors as a result of me including the same header file in multiple source code files in the same project. I'd strongly prefer to avoid…
Wolerywol
13
votes
6 answers

read pixel value in bmp file

How can I read the color value of 24bit BMP images at all the pixel [h*w] in C or C++ on Windows [better without any 3rd party library]. I got Dev-C++ A working code will be really appreciated as I've never worked on Image reading & have come to SO…
Sourav
  • 17,065
  • 35
  • 101
  • 159
13
votes
7 answers

No error window in Dev cpp

I am sorry for this silly doubt. But when I compile this program, it only shows error line. It does not show error window. (I have purposely made an error here, I know the correct solution in code ). I tried view section in menu bar, but couldn't…
Jay Patel
  • 1,266
  • 6
  • 20
  • 38
12
votes
7 answers

Get parent directory from file in C++

I need to get parent directory from file in C++: For example: Input: D:\Devs\Test\sprite.png Output: D:\Devs\Test\ [or D:\Devs\Test] I can do this with a function: char *str = "D:\\Devs\\Test\\sprite.png"; for(int i = strlen(str) - 1; i>0; --i) { …
vietean
  • 2,975
  • 9
  • 40
  • 65
12
votes
1 answer

Defining Bytes in GCC Inline Assembly in Dev-C++(.ascii in AT&T syntax on Windows)

The code below is just showing a Message Box on the screen. The addresses are hardcoded to facilitate: int main () { asm("xorl %eax, %eax \n" "xorl %ebx, %ebx \n" "xorl %ecx, %ecx \n" "xorl %edx, %edx…
jyz
  • 6,011
  • 3
  • 29
  • 37
12
votes
5 answers

Delphi application leaking AnsiStrings

According to FastMM4, the Delphi program I'm working on at the moment is leaking a lot strings. AnsiStrings to be precise: The application (http://sourceforge.net/projects/orwelldevcpp/) used to leak a lot more other data types, but FastMM4 could…
Orwell
  • 1,468
  • 1
  • 13
  • 28
10
votes
5 answers

In a switch case statement, it says "duplicate case value" comes up as an error. Anyone know why?

I am working on a rock paper scissors program, but this time the computer chooses rock half the time, scissors a third of the time, and paper only one sixth of the time. The way I did this was I enumerated six possible computer choice values: enum…
Victor Odouard
  • 1,345
  • 3
  • 15
  • 28
9
votes
3 answers

What files of my project should I put in repo

I'm using Dev-C++ IDE for C programming. I want to put my project in Github but I'd like to know which type of files should I put there. I mean, the project folder has .o, .layout, .dev (dev-C++ project file), .exe along with source files .c and .h…
user1027046
  • 293
  • 1
  • 6
  • 11
1
2 3
62 63