How to run a .cpp in my ubuntu server? [closed]
up vote
0
down vote
favorite
I would like to run my server.cpp and client.cpp in my ubuntu server, someone can guide me in this ? I try ls(list) in my user in ubuntu server and it is empty. I want to import those files and execute the cpps. THankss !
server client
closed as unclear what you're asking by guntbert, Thomas Ward♦ Nov 26 at 0:28
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
0
down vote
favorite
I would like to run my server.cpp and client.cpp in my ubuntu server, someone can guide me in this ? I try ls(list) in my user in ubuntu server and it is empty. I want to import those files and execute the cpps. THankss !
server client
closed as unclear what you're asking by guntbert, Thomas Ward♦ Nov 26 at 0:28
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Possible duplicate of What is a command to compile and run C++ programs?
– guntbert
Nov 25 at 22:27
Are these files on the same machine in question?
– George Udosen
Nov 25 at 22:27
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I would like to run my server.cpp and client.cpp in my ubuntu server, someone can guide me in this ? I try ls(list) in my user in ubuntu server and it is empty. I want to import those files and execute the cpps. THankss !
server client
I would like to run my server.cpp and client.cpp in my ubuntu server, someone can guide me in this ? I try ls(list) in my user in ubuntu server and it is empty. I want to import those files and execute the cpps. THankss !
server client
server client
asked Nov 25 at 22:01
Ramiro
31
31
closed as unclear what you're asking by guntbert, Thomas Ward♦ Nov 26 at 0:28
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by guntbert, Thomas Ward♦ Nov 26 at 0:28
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Possible duplicate of What is a command to compile and run C++ programs?
– guntbert
Nov 25 at 22:27
Are these files on the same machine in question?
– George Udosen
Nov 25 at 22:27
add a comment |
Possible duplicate of What is a command to compile and run C++ programs?
– guntbert
Nov 25 at 22:27
Are these files on the same machine in question?
– George Udosen
Nov 25 at 22:27
Possible duplicate of What is a command to compile and run C++ programs?
– guntbert
Nov 25 at 22:27
Possible duplicate of What is a command to compile and run C++ programs?
– guntbert
Nov 25 at 22:27
Are these files on the same machine in question?
– George Udosen
Nov 25 at 22:27
Are these files on the same machine in question?
– George Udosen
Nov 25 at 22:27
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
You can’t run .cpp files the way they are. You have to compile them. You can use g++. It can be installed using apt on the package with the same name. If you’re not sure how to use it then see this question: What is a command to compile and run C++ programs?
From your question it sounds like your code was written on a different machine than the server. So you should get the files onto the server. If you physically can access it, use a USB drive or other storage medium. If you have a cloud instance or some other type of remote server, normally you should be able to ssh into it. So you can use scp to copy your files.
The syntax is:
scp -P <port> file-to-copy user@server:/where/to/put
Afterwards you should be able to run your code.
If you’re still a bit confused about scp you can try looking at this article: https://linuxize.com/post/how-to-use-scp-command-to-securely-transfer-files/
Hope this helps!
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
You can’t run .cpp files the way they are. You have to compile them. You can use g++. It can be installed using apt on the package with the same name. If you’re not sure how to use it then see this question: What is a command to compile and run C++ programs?
From your question it sounds like your code was written on a different machine than the server. So you should get the files onto the server. If you physically can access it, use a USB drive or other storage medium. If you have a cloud instance or some other type of remote server, normally you should be able to ssh into it. So you can use scp to copy your files.
The syntax is:
scp -P <port> file-to-copy user@server:/where/to/put
Afterwards you should be able to run your code.
If you’re still a bit confused about scp you can try looking at this article: https://linuxize.com/post/how-to-use-scp-command-to-securely-transfer-files/
Hope this helps!
add a comment |
up vote
3
down vote
accepted
You can’t run .cpp files the way they are. You have to compile them. You can use g++. It can be installed using apt on the package with the same name. If you’re not sure how to use it then see this question: What is a command to compile and run C++ programs?
From your question it sounds like your code was written on a different machine than the server. So you should get the files onto the server. If you physically can access it, use a USB drive or other storage medium. If you have a cloud instance or some other type of remote server, normally you should be able to ssh into it. So you can use scp to copy your files.
The syntax is:
scp -P <port> file-to-copy user@server:/where/to/put
Afterwards you should be able to run your code.
If you’re still a bit confused about scp you can try looking at this article: https://linuxize.com/post/how-to-use-scp-command-to-securely-transfer-files/
Hope this helps!
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
You can’t run .cpp files the way they are. You have to compile them. You can use g++. It can be installed using apt on the package with the same name. If you’re not sure how to use it then see this question: What is a command to compile and run C++ programs?
From your question it sounds like your code was written on a different machine than the server. So you should get the files onto the server. If you physically can access it, use a USB drive or other storage medium. If you have a cloud instance or some other type of remote server, normally you should be able to ssh into it. So you can use scp to copy your files.
The syntax is:
scp -P <port> file-to-copy user@server:/where/to/put
Afterwards you should be able to run your code.
If you’re still a bit confused about scp you can try looking at this article: https://linuxize.com/post/how-to-use-scp-command-to-securely-transfer-files/
Hope this helps!
You can’t run .cpp files the way they are. You have to compile them. You can use g++. It can be installed using apt on the package with the same name. If you’re not sure how to use it then see this question: What is a command to compile and run C++ programs?
From your question it sounds like your code was written on a different machine than the server. So you should get the files onto the server. If you physically can access it, use a USB drive or other storage medium. If you have a cloud instance or some other type of remote server, normally you should be able to ssh into it. So you can use scp to copy your files.
The syntax is:
scp -P <port> file-to-copy user@server:/where/to/put
Afterwards you should be able to run your code.
If you’re still a bit confused about scp you can try looking at this article: https://linuxize.com/post/how-to-use-scp-command-to-securely-transfer-files/
Hope this helps!
edited Nov 25 at 22:45
answered Nov 25 at 22:30
an actual toaster
1285
1285
add a comment |
add a comment |
Possible duplicate of What is a command to compile and run C++ programs?
– guntbert
Nov 25 at 22:27
Are these files on the same machine in question?
– George Udosen
Nov 25 at 22:27