c++ - G++ does not recognise "//" as a comment -


I'm trying to compile the following signin (CYGWIN_NT-6.1-WOW64 1.7.28 (0.271 / 5/3) I686):

  // Integration Regular Template & lt; Typename method, typename f, typename float & gt; Double Consolidated (FF, Float A, Float B, Int Strips, Method M) {Double S = 0; Double H = (B-A) / phase; For (int i = 0; i   

But I'm getting the following:

  sh-4.1 $ g ++ -o "triposoid_numeric_pu" traposide_numeric_apppp sh-4.1 $ ./trapezoid_numerical_p3 .cpp /trapezoid_numerical_p3.cpp: line1: //: is a directory ./trapezoid_numerical_p3.cpp: Line 2: Type name: No such file or directory. /trapezoid_numerical_p3.cpp: Line 3: Syntax error near unexpected token `('/' Trapezoid_numerical_p3.cpp: Line 3: 'Double Integrated (FF, Float A, Float B, Int strips, Method M) SH -1.1 $ < / Code>  

strong> //: a directory error comes from Bash, and is not relevant to c ++ code Can not seem to have any relevant leads.

Can you recommend how to solve the above?

you Trying to run .cpp file.

There is a command to run your program (on Sigwin / Windows):

  sh -4.1 $ ./trapezoid_numerical_p3.exe   

or (on Linux / Unix):

  sh-4.1 $ ./trapezoid_numerical_p3   

.cpp when you try to run your program.

Your comment "The error that comes from Bash is correct" ', When you try to run the .cpp file, Try to run as Ript does bash does not c understand (As has been written by many observations).

Comments

Popular posts from this blog

c# - Roxy file manager in MVC doesn't accept session path -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

java - Ajax call to jsp and jsp redirecting to further jsp -