+ 2
Use of undeclared identifer "sgshs" why????
#include <iostream> #include <string> using namespace std; void print (string word) { cout << word << endl; } int main() { print (sgshs); return 0; }
5 Réponses
+ 2
because sgshs is a variable, if you want to display sgshs you need to do
print("sgshs");
notice the quotes, they make it a string without them you are trying to pass an undeclared variable to print
+ 3
You gave to enter it as "sgshs", not sgshs as there is no any varible declared in that name
+ 3
welcome my friend, you can ask any question here and there.will be the friendly SL community to help you☺☺
+ 2
oh, thanks!
+ 2
really thanks) you all helped me a lot)