Saturday, 14 September 2013

setw not found in MSVC 2013 or NetBeans

setw not found in MSVC 2013 or NetBeans

I'm trying to write some simple code to learn cout formatting, and both
the IDEs listed in the title complain that they can't find/resolve the
identifier setw(). Here is my code:
#include <cstdlib>
#include <iostream>
#include <iomanip>
using std::cout;
using std::cin;
using std::endl;
using std::vector;
using std::string;
int main() {
cout << setw(10) << "Hello";
return 0;
}

No comments:

Post a Comment