01/10/2018, 14:51

Chạy code bằng Cmd

mình chạy code bằng cmd nhưng lại gặp lỗi này, mn có biết cách fix không ạ

PS F:Tự học CODECode nhápdong_ho_catdong_ho_cat> Source.cpp
Source.cpp : The term 'Source.cpp' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Source.cpp
+ ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Source.cpp:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Suggestion [3,General]: The command Source.cpp was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".Source.cpp". See "get-help about_Command_Precedence" for more details.
PS F:Tự học CODECode nhápdong_ho_catdong_ho_cat>

Vì mạng giật quá nên load ảnh không được ^^

*grab popcorn* viết 16:54 ngày 01/10/2018

Vì cmd chỉ chạy những chương trình exe, .bat, .cmd và vài file excutable khác. Source.cpp không nằm trong danh sách kia nên nó ko chạy được. bạn phải compile ra Source.exe đã.
Riêng trên powershell thì phải thêm chấm xẹt (./) trước tên chương trình (./Source.exe) thì nó mới chạy

Matapa viết 16:59 ngày 01/10/2018

Bạn thử đổi tên thư mục thành tiếng Anh thử, đừng để tên thư mục là tiếng Việt có dấu cách.

HelloWorld viết 17:01 ngày 01/10/2018

Hello world phiên bản 2 :))

Bài liên quan
0