I
I
Igor Sokolov2016-02-12 23:19:18
C++ / C#
Igor Sokolov, 2016-02-12 23:19:18

Are there correct settings for Visual Studio 2015?

Kind people. I want to ask. Can you please tell me if there are instructions for setting up Visual Studio 2015?
Here's what I'm talking about:
1) Somehow I saw on the forum, the dude wrote that they say that Studio has a very useful tool, or a guide, with which it becomes easier to develop, that it is generally a very cool thing. They say you download a book on programming, install Studio and this thing is always at hand. Can you tell me where in the studio to open it?
2) And here's something else I came across. Many C++ books write programs like this:

#include <iostream.h>

int main()
{
  cout << "Hello World!\n";
  return 0;
}

I type it, and it says:
- identifier cout is undefined
- cannot open source file "iostream.h"
With versions of what? Then how can I learn from books in general, if everything is different?)))
3) And why is it interesting that my console disappears right away, I don’t have time to read anything, but there’s nothing about it in the book?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
GavriKos, 2016-02-12
@GavriKos

1) Most likely meant MSDN. To open it (local or web - it doesn't matter) - on the method that causes you questions, press f1.
2) What project was created? c++ console app? The second error is very confusing...
3) The console disappears immediately because it has finished its work. In order not to disappear immediately, you need to request some kind of input from the user (getch() for example).

A
Artyom Sveshnikov, 2016-02-13
@zenitfan2109

The file is not named iostream.h, but simply iostream. Try like this:

#include <iostream>
using namespace std;
int main()
{
  cout << "Hello World!\n";
  return 0;
}

UPD: If he scolds stdafx.h, then:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
  cout << "Hello World!\n";
  return 0;
}

V
valent_in_habrahabr, 2016-03-03
@valent_in_habrahabr

#include "stdafx.h"
#include <iostream>

int main()
{
  std::cout << "Hello World!\n";
  return 0;
}

It won't work without "stdafx.h". You need to remove the extension from iostream.h, this is not C. std is not specified.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question