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!
gackiem.

:) hi friend c++ is very easy & intresting
you just go through book
name is efficient c++.:rolleyes:

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().

Thks for your help
Best regard
gackiem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.