Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help compiling my C++ program on vim. What would I use in my command line

ID: 3843705 • Letter: I

Question

I need help compiling my C++ program on vim. What would I use in my command line to get the program to run properly with these filenames. My program compiles with code::blocks so I don’t think the errors are within the programs.

Node.hpp

NodeMain.cpp

textFile.txt

Makefile

Thank you

//---------------------------------------------------------

Here are the textFile contents:

22 44 66 88

//-------------------------------------------------------------

Here are the Makefile contents:

all: node

node: NodeMain.o

              g++ NodeMain.o -o node

NodeMain.o: NodeMain.cpp

              g++ -c NodeMain.cpp

clean:

              rm .o node

Explanation / Answer

To compile and run the c++ program in vim, we have to follow these two ways..

2) second way..

$ g++ NodeMain .cpp -o NodeMain

$ ./NodeMain

Run using either of this way... it will work.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote