bash - Ubuntu gives "cannot execute binary file" error when I execute C++ program -


I have just written the code in some visual studio and trying to run it on my school's Linux server through the shell I am Code runs fine in Visual Studio and complies with g ++ in Linux but bash *. /.outout * or bash * file_name * / code>. I think there is some syntax which I accept in VS 2012, but does not translate it into running on the server.

This program means that it is for setting up whether the two users have union or intersection between the recorded sets.

Can anyone tell me what I am missing after seeing my code? Thus far I have been able to #include & lt; Cstring & gt; has to be done to compile but there was nothing besides this

  #include & lt; String & gt; # Include & lt; Iostream & gt; # Include & lt; Set & gt; # Include & lt; Cstring & gt; using namespace std; Int main () {string set1, set2; String extra 1 [100], extra 2 [100]; Cout & lt; & Lt; "Enter your first set" & lt; & Lt; '\ N'; Getline (CIN, SET1); Char * ch1 = New Charge [100]; Strcpy (ch1, set1.c_str ()); Cout & lt; & Lt; "You enter another set" & lt; & Lt; '\ N'; Getline (CIN, SET2); Char * ch2 = New Charge [100]; Strcpy (ch2, set2.c_str ()); Int z = 0; For (int i = 0; i & lt; set1.size (); ++ i) {const char c = ch1 [i]; If (C == '') {++ z; to continue; } And if (c == ',') {continue; } And if (C> = '0' & amp; c; & lt; = '9') {extra1 [z] + = ch1 [i]; } And continue; } Int capture = z + 1; Int r = 0; For (int i = 0; i & lt; set2.size (+; i) {const char c = ch2 [i]; If (C == '') {++ r; to continue; } And if (c == ',') {continue; } And if (C> = '0' & amp; c; & lt; = '9') {Extra 2 [R] + = C2 [i]; } And continue; } Int capture2 = r + 1; Int g = 0; The string's last [100]; For (int i = 0; i  


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -