hi everybody,
I've got some troubles in C and i need your help
In C: (test.c)
Suppose i include <unistd.h> and i call function "open" ==>> it run OK
In C++: (test.cpp)
I'm using a framework (e.g. RTM) which is function "open" has already in it.
My problem is: althought i include <unistd.h> , but every time i call function "open" in test.cpp will show an error such as "no matching function for call to test::open()"
I suppose the compiler doesn't understand the function "open" should be call in <unistd.h> library.
Is there the way to solve it?
any help will be appreciate!

10 Years
Discussion Span
Last Post by gackiem

test::open() is not the same function as the open function in that unistd.h. If you want to call the function in unistd.h than use the :: namespace operator, for example ::open(/* blabla */); HOWEVER, you are writing a c++ program then use c++ standard fstream objects instead of the very low-level open().

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.