Reputation: 2298
How do you do
#include <stdio.h>
in xcode?
I get all these errors.
Upvotes: 0
Views: 12287
Reputation: 342
You're a C programmer huh?
<stdio.h>
is C's I/O library. I think you're looking for this (C++'s I/O library):
#include <iostream>
Upvotes: -1
Reputation: 41321
For std::ofstream
you #include <fstream>
.
For std::string
you #include <string>
.
<stdio.h>
is a C header needed for functions such as printf
or fopen
. It's included like this: #include <stdio.h>
. In C++ it's better to #include <cstdio>
instead, so all names are embedded in namespace std
(so you should use std::printf
etc).
Upvotes: 3