• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

IDE doesnt works

 
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am trying to compile the next program



But then the compilation doesn´t finish. It says that g++ stopped working.

Someone knows how to fix it? Or another simple IDE I could use? It is only for build some easy C examples

Regards
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is C code, not C++, so you should be using gcc, not g++.
 
Ranch Hand
Posts: 69
2
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) The return type specifier of 'main' cannot be omitted.

2) Why are you putting newline characters in your scanf format?

3). You are missing varargs in your printf call.

4). None of the above should crash gcc / g++. Which IDE are you using?
 
Angus Ferguson
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I need to compile 2 very simple C programs. My IDE DEV ++ says that g++ doesnt works I know I should be using gcc I have test in compile options and it looks like it is correct

Someone know any onine copiler or another quick and simple way to compile it please?

Regards,
Isaac
 
Luke Leber
Ranch Hand
Posts: 69
2
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Isaac Ferguson wrote:My IDE DEV ++



Stop the clock, there's the problem. Dev-cpp is extremely outdated, buggy, and unmaintained. There is a maintained branch of the original called Orwell Dev C++. ( http://sourceforge.net/projects/orwelldevcpp/ )

Alternatively, you could try netbeans, visual studio, codeblocks, or use the command line.

For online compilers, try IDEONE (www.ideone.com )

Hope it helps.
 
Ulf Dittmer
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Isaac Ferguson wrote:I know I should be using gcc


Have you actually done that? On the CLI, g++ produces an error with this code, whereas gcc doesn't.
 
Angus Ferguson
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I tried.

Thanks now I can compile

Regards
 
Liar, liar, pants on fire! refreshing plug:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic