#my first ever c++ script

23 messages · Page 1 of 1 (latest)

proven whale
#

Im just now learning how to write c++ after python and it is already giving me an error message

marble marlinBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

pseudo gyro
#

!howto ask

marble marlinBOT
# pseudo gyro !howto ask
How to Ask A Programming Question

Anyone can ask a question in our programming channels. Following the guide Writing The Perfect Question is recommended.

What To Post

State your problem clearly and provide all necessary details:

  • the relevant portion of your code, or all of it
  • the expected output
  • the actual output (or the full error) 🏆 Gold Standard: Minimal Reproducible Example
Where To Post

Provide the relevant code in the message, and format it nicely with a code block*. If it's too much for one message, you can upload it:

  • Compiler Explorer for most C/C++ snippets
  • OnlineGDB for interaction, debugging ⛔ Do not post screenshots, let alone photos of your screen!
proven whale
#

Bos-Mac-mini:Discord Bot Stuff bo-rocks$ cpp helloworld.cpp
clang: error: no such file or directory: 'helloworld.cpp'
clang: error: no input files
Bos-Mac-mini:Discord Bot Stuff bo-rocks$

#

i have that file tho

last bluff
#

do ls -l helloworld.cpp

#

check if clang has permissions to even read that file

proven whale
#

so i type that in the terminal

#

bash command not found

#

@last bluff lemme just send a screen shot real quick that would be much easier

#

@last bluff there

#

@last bluff hello?

past ingot
#

so the file might not exist until it is saved

#

also you appear to be missing a }

last bluff
proven whale
#

Ok

bitter remnant
#

don't recommend using vs code or any other ide except for codeblocks

#

There are tons of linking problems that will come along as you learn c++

#

most of the time they're not beginner friendly

kind sorrel
# proven whale
  1. Add a return type for main function (int main)
  2. Save the file
  3. Run the file (depending on your compiler)

Advise : use clion ide for cpp