-1

I try to build a simple piece of code in Visual Studio, but the building process gets entangled in an infinite loop.

The code is simple:

// test.cpp : Defines the entry point for the console application.
//

#include <iostream.h>

using namespace std;

int main(void)
{
    cout << "Hi." << endl;
    return 0;
}

Any idea what is going on?

Thanks.

Svalbard
  • 182
  • 2
  • 13
  • What's in your `stdafx.h`? And at what stage during the build does it get stuck? preprocessing, compiling or linking? – Rowland Shaw Jan 23 '15 at 13:55
  • I made the code even simpler now. It is not working.... – Svalbard Jan 23 '15 at 14:06
  • Ok, so I rewrote the simple code example. How can I find our what stage the code is stuck? – Svalbard Jan 23 '15 at 14:07
  • `stdafx.h` is some stupid pre-compiled that VS keeps pushing you to add when making a new project. I've seen it cause trouble before. – dmg Jan 23 '15 at 14:09

1 Answers1

0

spot several things:

  1. not sure what's in 'stdafx.h'
  2. #include < iostream >
  3. std::cout, std::endl (unless using namespace std; somewhere)

Build works fine for me, though.

menrfa
  • 1,527
  • 12
  • 13