S
Salman
How to mix C and C++ ?
In what context? Every time you call into your operating system you areSalman said:How to mix C and C++ ?
Salman said:How to mix C and C++ ?
Carefully. Usually with a sprinkle of 'extern "C" ' where
needed. Also, recommended to use different bowls until ready
to link. Do you have any particular question?
V
Salman said:i want to use both type of file streams i.e FILE and fstream in my
program. Forget abt the reason why i need them. Is this possible to
have both in my code?
Its not working, tell me how to?
How to mix C and C++ ?
i want to use both type of file streams i.e FILE and fstream in my
program.
Forget abt the reason why i need them.
Is this possible to have both in my code? Its not working, tell me how to?
Remember that the C standard library is part of C++ so
#include <cstdio>
#include <iostream>
and you are good to go.
Usually the reason for a need can tell quite a lot about how to
satisfy it, so most of us usually likes to know the reason for
something since it means that we'll be better able to answer the
question. It's not uncommon for people to ask about how to do
something that can be done in a much better way, but if they don't
tell what they are trying to do how will we be able to tell?
How is it not working? Error-messages etc. would be helpful, so would
the code they does not work. Are you trying to use a fread() on a
fstream or something like that?
Nonsense.NO,IT IS NOT POSSIBLE TO MIX C,C++
i want to use both type of file streams i.e FILE and fstream in my
program. Forget abt the reason why i need them. Is this possible to have
both in my code? Its not working, tell me how to?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.