TripleX

#include <iostream>

int main()
{
    std::cout <<"You are a hero from a world filled with monster and you need to solve some riddles to get pass a dungeon";
    std::cout << std::endl;
    std::cout <<"Give the right numerical 3 digit number to continue...";
    return 0;
}

TripleX.cpp(5): note: see reference to function template instantiation ‘std::basic_ostream<char,std::char_traits> &std::operator <<<std::char_traits>(std::basic_ostream<char,std::char_traits> &,const char *)’ being compiled
im pretty sure i followed the video to the dot but it keep giving me this error

Maybe assign variables the strings and then print them

i haven’t gotten to variables yet so i don’t know how they work in c++

Here’s an example:

#include <iostream>

int main()
{
    char message[1000] = "You are a hero from a world filled with monster and you need to solve some riddles to get pass a dungeon";
    std::cout << message;
    std::cout << std::endl;
    return 0;
}

what is the [1000] after the message for

Go back to how you originally had it and compile with /EHsc

cl triplex.cpp /EHsc
1 Like

TripleX.cpp(3): fatal error C1004: unexpected end-of-file found
that was outputed when i added /EHsc

What code do you have?

#include <iostream>

int main()
{
    std::cout <<"You are a hero from a world filled with monster and you need to solve some riddles to get pass a dungeon";
    std::cout << std::endl;
    std::cout <<"Give the right numerical 3 digit number to continue...";
    return 0;
}
1 Like

That looks fine. If you still get the error, delete the triplex.obj and .exe files and recompile.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms