6 Replies - 213 Views - Last Post: 08 July 2012 - 06:57 PM Rate Topic: -----

#1 nickkorta  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 06-June 12

Weird errors

Posted 08 July 2012 - 06:36 PM

I just moved on to C++ from C# because I want to make applications that don't require .netframework.
I'm using Visual studio C++ express IDE because I used the C# version to program in C# so I feel at home but I found a weird problem.

Im getting errors using this code when Im not suppose to

#include <isotream>

using namespace std;

int main()
{
	count<<"hello world" << endl;
	return 0;
}




#include, std , count and endl all have red underline.

Im using the empty project template and added a a cpp file called main in which this code is located in.

I followed this tutorial

http://www.youtube.c...=6&feature=plcp

I did everything exactly what kakashura (Persion who uploaded the video) did, so im lost.
I just installed the ide and restarted the computer. I also tried visual ultimate and got the same errors.

Thanks

Thanks

Is This A Good Question/Topic? 0
  • +

Replies To: Weird errors

#2 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5182
  • View blog
  • Posts: 26,891
  • Joined: 10-May 07

Re: Weird errors

Posted 08 July 2012 - 06:42 PM

Count is not the same as cout.
Was This Post Helpful? 0
  • +
  • -

#3 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3470
  • View blog
  • Posts: 10,703
  • Joined: 05-May 12

Re: Weird errors

Posted 08 July 2012 - 06:43 PM

The header file is iostream, not isotream.

The global variable is cout, not count.

This post has been edited by Skydiver: 08 July 2012 - 06:44 PM

Was This Post Helpful? 0
  • +
  • -

#4 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,964
  • Joined: 08-June 10

Re: Weird errors

Posted 08 July 2012 - 06:45 PM

There are two problems there that I can see. First, on the first line you should be including iostream, not isotream. And second, on line 7 you should be using cout, not count.

In the future, please also post the error messages themselves. (Just roll your mouse over the highlighted parts of the code and you should see them, or just try to compile the code and look at the output.)
Was This Post Helpful? 0
  • +
  • -

#5 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3470
  • View blog
  • Posts: 10,703
  • Joined: 05-May 12

Re: Weird errors

Posted 08 July 2012 - 06:48 PM

Oh, and one more thing... in VS2010, don't rely on the red squiggly lines while you are editing... or at least not as much as you did in C#.

Fix the first few errors, do a Build, and then look at the squiggly lines.
Was This Post Helpful? 0
  • +
  • -

#6 nickkorta  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 06-June 12

Re: Weird errors

Posted 08 July 2012 - 06:53 PM

Wow I feel like an idiot. Thanks guys. Now im really depressed for making this mistake.
Was This Post Helpful? 0
  • +
  • -

#7 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5182
  • View blog
  • Posts: 26,891
  • Joined: 10-May 07

Re: Weird errors

Posted 08 July 2012 - 06:57 PM

Not to worry. I did the same thing on my first program, except back then everyone just jumped on me & told me I was an idiot. I wrote studio.h instead of stdio.h
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1