Visual Studio Ultimate 2012, Hello World unsuccesfull

Hey guys I decided to learn C++ and I searched for tutorials around web and this side looks perfect. I am the definition of beginner :)

I used the instructions just like here="http://www.cplusplus.com/doc/tutorial/introduction/visualstudio/"

I created a c++ item under source files named it main

I coded like this as it's instructed to the very beginner.
1
2
3
4
5
6
  #include <iostream>
int main()
{
  auto x = R"(Hello world!)";
  std::cout << x;
}


But my application didnt work and I got many errors.

Errors are like :
Error 1 error C2065: 'R' : undeclared identifier
Error 2 error C2143: syntax error : missing ';' before 'string'
Error 3 error C2593: 'operator <<' is ambiguous
4 IntelliSense: identifier "R" is undefined
5 IntelliSense: expected a ';'

How do I overcome this issue? It is not really motivating when it is about your first code :D
Do I have to make a configuration to Visual Studio Ultimate 2012 and if it is so how, or maybe it is something else please help me.

Thanks :)

I've never seen an "R" in front of a text string, only "L"

try
auto x = L"(Hello world!)";

don't know why that tutorial has an R in it.
What's with the R? you already named your identifier 'x', so what's up with the R? erase it, and it should work.
The sample code in the tutorial is wrong.
it means a Raw string literal (c++11), & it's not supported in VS 2012

http://msdn.microsoft.com/en-us/library/hh567368.aspx

just remove that R and it should compile fine
Thanks a lot guys I dont know anything about R or c++ just a beginner and I hope your answers also will help new starters like me

Or somebody could correct the mistake :)
Topic archived. No new replies allowed.