I have just learned C++ -- and I decided one project I am working for, I am better off going back to the drawing board and writing it from scratch in C++, rather than trudging on with C.
There is just one concern --- part of this project includes libraries. Some libraries will not be needed in C++, but some will.
I notice that the syntax for including library headers is different in C++ than it is in C. In C you write the following:
#include <someheader.h>
On the other hand, in C++ what you type is the following (if it is a C++ library):
#include <someheader>
Because of this, I am wary that there might be some differences in how I put together a C++ header file than in how I put together a C header file -- or at least some difference in how I name it in the file-system.
So does anyone have any information what I need to know in putting together a C++ library-header file as opposed to one for C?
#include <stdio.h>
is as valid C as it is C++stdio.h
is deprecated in C++.<cstdio>
alternatives to<stdio.h>
. For any other library, you can't just simply decide which to use: you have to match the file name.