library problem

W

wongjoekmeu

Hello All,
I have a question that maybe someone would be able to give me some
advice. In linux I have written a C++ program which makes use of a
library. The library is actually a sort of an API, which I use to
control a machine. When I call the initialise() function of the API,
it seems that a thread is being started and a value 0 is constantly
written to standard output. I know this, because in my main function I
have a menu where the user can enter an integer then press enter to
choose which menu function to execute. Because I print out to standard
out the value that is being enter I see the value 0. Probably 0 and \n
is being passed by the initialise() function in the library. Of course
I don't want this to happen, so I was wondering if there is anyway how
I can redirect the 0 value that the library thread is passing to
standard output. I have no source code of the library. Anyone has any
suggestion or advise for me. ?
Many thanks in advance.
RR
 
N

Noah Roberts

Hello All,
Anyone has any
suggestion or advise for me. ?

Yeah, you'd be best served asking this in a Linux specific newsgroup.
Neither threads nor libraries are part of the standard. The methods to
work with them are VERY platform specific.
 
F

fred.l.kleinschmidt

Hello All,
I have a question that maybe someone would be able to give me some
advice. In linux I have written a C++ program which makes use of a
library. The library is actually a sort of an API,
<snip>

A library is not "a sort of an API".

A library *HAS* an API - Application Programmer Interface.

The API is an (accurate) *description* of all of the
public methods, variables, structs, classes, etc., in the
library, telling the programmer how to use it.
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top