hello everyone
can tell me what diffrent
#include<stdio.h>
and
#include<iostream>
thank you~!
hello everyone
can tell me what diffrent
#include<stdio.h>
and
#include<iostream>
thank you~!
<stdio.h> is for the c standard of i/o, and includes functions such as scanf and prinf
<iostream> is for the c++ standard of i/o, and includes functions such as cin and cout
Furthermore, <iostream> is if you want the iostream functions to be in the std:: namespace. Otherwise, the functions included in <iostream.h> reside in the local namespace. If this paragraph confuses you, you may want to use <iostream.h> until you learn the difference.
-sh0x
well the difference is
#include<stdio.h>
include the C standard i/o functions
such as
input:
scanf()
gets()
getchar()
ect...
output:
printf()
putchar()
putc()
ect...
#include<iostream>
// note there is a difference between this an <iostream.h>
includes the std namespace
that has all the C++ standard, i/o vectors, maps ect...ect...
input
std::cin
output
std::cout
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.