4 Replies - 162 Views - Last Post: 05 December 2017 - 03:30 PM Rate Topic: -----

#1 SteveHi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 07-June 15

Errors with simple 'Hello' programme

Posted 05 December 2017 - 08:55 AM

Hello

I have just taken up C++ and have the following code in Visual Studio 2017:

#include <iostream>


int main()

{

	std::cout << "Hello Rose!" << std::endl; 'This statement is the line that does the printing

    return 0;
}


I am getting over 450 errors of the type 'Cannot open the source file float.h' and 'Cannot open the source file errno.h'.

How should I begin to resolve these errors, please?

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Errors with simple 'Hello' programme

#2 jimblumberg  Icon User is online

  • member icon

Reputation: 5451
  • View blog
  • Posts: 16,977
  • Joined: 25-December 09

Re: Errors with simple 'Hello' programme

Posted 05 December 2017 - 09:01 AM

You may want to try either removing the 'This statement is the line that does the printing or use proper C++ comments //This statement is the line that does the printing.



Jim
Was This Post Helpful? 1
  • +
  • -

#3 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13960
  • View blog
  • Posts: 55,724
  • Joined: 12-June 08

Re: Errors with simple 'Hello' programme

Posted 05 December 2017 - 09:02 AM

See about adding:
using namespace std;

to line 2
Was This Post Helpful? 0
  • +
  • -

#4 ndc85430  Icon User is offline

  • I think you'll find it's "Dr"
  • member icon

Reputation: 786
  • View blog
  • Posts: 3,196
  • Joined: 13-June 14

Re: Errors with simple 'Hello' programme

Posted 05 December 2017 - 09:53 AM

modi123_1, that's unnecessary in this case since cout and endl are fully qualified with their namespace.
Was This Post Helpful? 1
  • +
  • -

#5 SteveHi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 07-June 15

Re: Errors with simple 'Hello' programme

Posted 05 December 2017 - 03:30 PM

Thank you all.

Yes, without the comments, the errors have gone.

Steve
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1