Hi All
I am trying to insert values in map as <char*,int> .
The key is combination of 2 numbers which is generated in code.
The problem is when I am trying to get count of that key, it is...
Type: Posts; User: nickman
Hi All
I am trying to insert values in map as <char*,int> .
The key is combination of 2 numbers which is generated in code.
The problem is when I am trying to get count of that key, it is...
Hi All
I have one question. I was trying to test private inheritance and saw something which I need some help to understand.
class Base
{
Hi All
I am creating an application and requirement is that for region NA and EMEA a process should run and check some information from tables and send out the mail.
Since both region has to do...
Hi all
I have used extern function while calling in C++ program using extern keyword.
But I have seeing one issue when using a variable. A sample program is below.
A.h declare a variable x...
Hi
It's specific to OS. I think it has compiler of old version.I'll try to check.
On other hand, I was able to run the program with 2 threads. But One thing I am observe in the output.
The...
Thanks for reply.
Motivation is using multithreading to understand more on it. I know, multithreading is used for data which is shared and what I am doing will not improve performance.
Secondly,...
Thanks for reply.
I have tried without using muex. But issue in DBhandler class. So the function captureLogWithBaseInfo() is like this.
captureLogWithBaseInfo(CaptureClass cap)
{
//...
Hi All
I need some help in multithreading with functions.
I have requirement to get info related to N numbers of orders. So I have created a program which has 2 threads( as of now) to capture...
I'll change it and then test.
Thanks for advice. Will get back if see any issue.
Thanks
Nickman
Hi Salem
My Concern was on object.Since both the thread are using same object, one thread can overide the other object content.
I got an idea to create 4 objects and pass them to...
Hi Salem
You mean code should like be this:
studentCapture::startCapture()
{
pthread_mutex_lock(&count_mutex);
Thanks.
So you mean, thread 1 put mutex lock and while processing functions, Thread 2 will start executing? I was thinking that mutex lock will ensure that untill it is unlock no thread will take...
Thanks Salem.
So it mean that if one thread lock mutex say Thread1, then it will execute:
cap->validateStudent(temp); // Operation Function
cap->initStudentParm(temp); ...
Hi
I am using Iseries and my current version didn;t support C++11. So I have to manage with what I have. I saw tutorial on C++11 multithreading but can't implement on my iseries version.
Thanks...
Hi All
I am trying to implement multi Threading with class objects.
I have the requirement to capture details of n students and put in separate file for each student.
For this I have created...
Yes. I agree that operator delete[] shoulb be implemented and I mention in post too that I have not implemented that I want to understand the behavior of construction first.
I have changed the...
Thanks Elisa for pointing of those points. I have to put try catch in main from where I am creating objects and bad_alloc will be thrown by operator new.
I have changed that.
Ok I got you point...
Hi All
I created a program for allocating array of objects dynamically using operator overloading of new Operator. Below is the code. I have not implemented the code for deletion of array of...
I tried this in Template1.h
I tried this in Template1.h
template<typename T,typename T1> extern void getData();
Yes. By defining in header it was working fine. But I want to try the solution in the link. But it was not working.
Am I doing something wrong?
Also,as link suggest that make function as extern...
Thanks for reply.
I was too reading that link. I am using class, so how can I declare member function as extern? As shown in link.
Is there some other syntax for Class ?
Could you please help....
Hi team
I was working on template and found the linker error while compiling the code.
Below is the code:
//Template1.h: Header file where template define
Hi Elysia
So in this X(sum) will first call constructor and initialized m_sum and then functor will be called and do the sum. Right?
Hi Eylsia
Can you help with syntax to used for using functor as reference.
Thanks
Nickman
Hi Salem
It calls one time in constructor. Also 2 calls for functor and values were proper shown.
Below is output:
thanks
Nickman