likely has gcc
and g++
pre-installed. However, it's always good to check and install any missing dependencies. sudo apt install build-essential - Using a text editor like gedit
, nano
, or vim
, create a C++ file with a .cpp
extension. For example, hello.cpp
. Open a terminal and navigate to the directory where your C++ file is located Then, use the g++
compiler to compile the file: g++ hello.cpp -o hello . This command compiles hello.cpp
and creates an executable file named hello
. finally : ./hello
All Replies
Owensuwu
2024-08-08 13:40 deepin
Reply Like 1 View the author
c***[email protected]
2024-08-30 12:32 deepin
It has been deleted!
c***[email protected]
2024-08-30 12:36 deepin
It has been deleted!
t***[email protected]
2024-10-01 15:20 deepin
I'm glad to see the interest in deepening our understanding of C++ development in Deepin! Transitioning from Windows to a Linux-based system can be a bit challenging, especially publixpassport with compiling code. It's great to have resources and community support to help each other through these changes.
Reply Like 0 View the author
Please sign in first
Popular Events
More
Hi, I am fairly new to Deepin, and I have a problem running c++ files. I used to do it on my windows using gcc/g++, but now i cannot for the life of me figure how and what to do to complie and c++ files!