Click here to Skip to main content
15,920,438 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionCList inside a CMap Pin
kasi1420-Oct-10 8:51
kasi1420-Oct-10 8:51 
AnswerRe: CList inside a CMap Pin
Richard MacCutchan20-Oct-10 21:58
mveRichard MacCutchan20-Oct-10 21:58 
AnswerRe: CList inside a CMap Pin
Cool_Dev21-Oct-10 0:15
Cool_Dev21-Oct-10 0:15 
Questionvector<string> and find Pin
Jonnster20-Oct-10 3:33
Jonnster20-Oct-10 3:33 
AnswerRe: vector and find [modified] Pin
Alain Rist20-Oct-10 5:04
Alain Rist20-Oct-10 5:04 
Questionhow to allocate memory dynamically for 2 dimensional array and use that pointer like and array.... Pin
cmaheshwari1619-Oct-10 18:40
cmaheshwari1619-Oct-10 18:40 
AnswerRe: how to allocate memory dynamically for 2 dimensional array and use that pointer like and array.... Pin
Stuart Dootson20-Oct-10 1:11
professionalStuart Dootson20-Oct-10 1:11 
Questionabout pthread.h Pin
lxlenovostar18-Oct-10 5:36
lxlenovostar18-Oct-10 5:36 
i use in linux by make,
but it output:
Linking CppFit_tests
lib/libCppFit.a(Mutex.o): In function `Mutex::Mutex()':
Mutex.cppFrown | :( text+0x18): undefined reference to `pthread_mutexattr_init'
Mutex.cppFrown | :( text+0x2b): undefined reference to `pthread_mutexattr_settype'
lib/libCppFit.a(Mutex.o): In function `Mutex::Mutex()':
Mutex.cppFrown | :( text+0xaa): undefined reference to `pthread_mutexattr_init'
Mutex.cppFrown | :( text+0xbd): undefined reference to `pthread_mutexattr_settype'
lib/libCppFit.a(Thread.o): In function `Thread::start()':
Thread.cppFrown | :( text+0x230): undefined reference to `pthread_create'
lib/libCppFit.a(Thread.o): In function `Thread::join()':
Thread.cppFrown | :( text+0x268): undefined reference to `pthread_join'
collect2: ld returned 1 exit status

The program is:
struct MutexInnards
{
public:
pthread_mutex_t mutex;
int nestLevel;
};


Mutex::Mutex()
{
pthread_mutexattr_t attr;

pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);

innards = new MutexInnards();
innards->nestLevel = 0;
pthread_mutex_init(&innards->mutex, &attr);
}


Mutex::~Mutex()
{
pthread_mutex_destroy(&innards->mutex);
delete innards;
}

void Mutex::acquire()
{
pthread_mutex_lock(&innards->mutex);
// innards->nestLevel++;
}

void Mutex::release()
{
// innards->nestLevel--;
// if (innards->nestLevel <= 0)
// {
// innards->nestLevel = 0;
pthread_mutex_unlock(&innards->mutex);
// }
}
AnswerRe: about pthread.h Pin
Richard MacCutchan18-Oct-10 9:28
mveRichard MacCutchan18-Oct-10 9:28 
GeneralRe: about pthread.h Pin
lxlenovostar18-Oct-10 15:59
lxlenovostar18-Oct-10 15:59 
GeneralRe: about pthread.h Pin
Richard MacCutchan18-Oct-10 22:27
mveRichard MacCutchan18-Oct-10 22:27 
GeneralRe: about pthread.h Pin
lxlenovostar18-Oct-10 23:13
lxlenovostar18-Oct-10 23:13 
GeneralRe: about pthread.h Pin
Richard MacCutchan19-Oct-10 0:26
mveRichard MacCutchan19-Oct-10 0:26 
Questionproblem Pin
samosato12-Oct-10 9:57
samosato12-Oct-10 9:57 
AnswerRe: problem Pin
Nuri Ismail12-Oct-10 21:55
Nuri Ismail12-Oct-10 21:55 
AnswerRe: problem Pin
Richard MacCutchan12-Oct-10 22:38
mveRichard MacCutchan12-Oct-10 22:38 
AnswerRe: problem [modified] Pin
Alain Rist13-Oct-10 4:52
Alain Rist13-Oct-10 4:52 
QuestionFire connection point event from ATL Service Pin
pratik_mishra3511-Oct-10 2:17
pratik_mishra3511-Oct-10 2:17 
Questionhow show the tooltip in each platform(vb,c#) Pin
765studio@gmail.com8-Oct-10 20:35
765studio@gmail.com8-Oct-10 20:35 
QuestionProblems to print Pin
Dansveen7-Oct-10 11:42
Dansveen7-Oct-10 11:42 
QuestionWhy normal virtual function required blank body in base class Pin
am 20096-Oct-10 2:22
am 20096-Oct-10 2:22 
AnswerRe: Why normal virtual function required blank body in base class Pin
Alain Rist6-Oct-10 3:13
Alain Rist6-Oct-10 3:13 
QuestionEnable moving marquee progress bar (C++, ATL/WTL, XP, VS2008) Pin
karuuzo5-Oct-10 6:58
karuuzo5-Oct-10 6:58 
AnswerRe: Enable moving marquee progress bar (C++, ATL/WTL, XP, VS2008) Pin
Alain Rist5-Oct-10 21:16
Alain Rist5-Oct-10 21:16 
GeneralRe: Enable moving marquee progress bar (C++, ATL/WTL, XP, VS2008) Pin
karuuzo6-Oct-10 1:13
karuuzo6-Oct-10 1:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.