简体   繁体   中英

My C++ hello world program fails to compile in Atom IDE using the Build script

so, for some background: I've been trying to get the build package in the atom IDE (since apparently, atom doesn't have a run or build button, what a waste should I say) to work for a while now, the details I don't want to bore you with, anyways I have everything up my sleeve but it all came out inconclusive.


so here's my code:

<#include <iostream>>
using namespace std;

int() {
  cout << "hello world"
  return 0;
}

I used this code to test the build package in the atom IDE to see if it could compile c++ code but I got an error:

   " no eligible build target found "

i clicked on the show stack trace button and this displayed:

   "No eligible build target.: No configuration to build this project exists.
at file///C:/Users/Administrator/.atom/packages/build/lib/build.js:113:15"

anyways, after all this i still have a question:

- why is this happening to me, and what can I do to fix this?

if you find a way to fix this then don't be afraid to answer, if you don't, do some research, hopefully it should help people who are answering this question

you need a semicolon after your cout statement and your main function needs to be defined as main

int main() {
  cout << "hello world";
  return 0;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM