Click here to Skip to main content
15,918,706 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Type struct question Pin
samzcs26-Apr-17 3:32
samzcs26-Apr-17 3:32 
QuestionPerformance Evaluation of fingerprint recognition and face recognition system Pin
Member 1313893619-Apr-17 8:38
Member 1313893619-Apr-17 8:38 
AnswerRe: Performance Evaluation of fingerprint recognition and face recognition system Pin
Afzaal Ahmad Zeeshan19-Apr-17 8:56
professionalAfzaal Ahmad Zeeshan19-Apr-17 8:56 
GeneralRe: Performance Evaluation of fingerprint recognition and face recognition system Pin
Member 1313893619-Apr-17 10:38
Member 1313893619-Apr-17 10:38 
QuestionCFileDialog fileDlg debug assertion error Pin
D.Manivelan19-Apr-17 3:07
D.Manivelan19-Apr-17 3:07 
AnswerRe: CFileDialog fileDlg debug assertion error Pin
Jochen Arndt19-Apr-17 3:48
professionalJochen Arndt19-Apr-17 3:48 
AnswerRe: CFileDialog fileDlg debug assertion error Pin
Randor 19-Apr-17 19:25
professional Randor 19-Apr-17 19:25 
QuestionSharing a structure between a console application and a static library Pin
manoharbalu17-Apr-17 21:51
manoharbalu17-Apr-17 21:51 
We have a console application to represent a process plant model. This application has several functions for doing plant calculations. We have defined a structure and a global object for maintaining the data and doing calculations, which is initialized in one of the function. We assign and calculate values for the members of the object by using it in all the corresponding functions.

For Eg:
struct plantDB
{
short IMISC_I [300];
char LL1_I [300];
char LL2_I [300];
char MALF_I [300];
char REMP_I [300];
float REM_I [300];
float NXS [30][600];
float VAR_I [1500];
float VART_I [300];
float VRAMP_I [300];
.
.
.
};

plantDB *ETest = new PlantDB;
Sample of the function:

float EULER(int N,int K,int TYPE,float DER,float MAX,float MIN,float FLAG)

{

float FACTOR = 0.0 ;
float EULER;

if ( FLAG ) ETest->VAR_I = 51.0 ;
}

We have defined a number of functions as shown above which changes the value of each of the members of ETest. Now our requirement is to identify and separate the functions to create a library to abstract it from users of the application.
Now, when I create a static library application and add the files with all the functions, and add the lib in my original application to use the functions, the functions still need to use the same object ETest, which is used in the main application as well. Is there any way to share the structure between the main application and the static library. Can I use the createfilemapping for creating a shared memory to assign values in the main app as well as the static library?
AnswerRe: Sharing a structure between a console application and a static library Pin
Richard MacCutchan18-Apr-17 3:04
mveRichard MacCutchan18-Apr-17 3:04 
AnswerRe: Sharing a structure between a console application and a static library Pin
Chris Losinger18-Apr-17 3:07
professionalChris Losinger18-Apr-17 3:07 
GeneralRe: Sharing a structure between a console application and a static library Pin
Richard MacCutchan18-Apr-17 5:18
mveRichard MacCutchan18-Apr-17 5:18 
GeneralRe: Sharing a structure between a console application and a static library Pin
Chris Losinger18-Apr-17 5:22
professionalChris Losinger18-Apr-17 5:22 
GeneralRe: Sharing a structure between a console application and a static library Pin
Richard MacCutchan19-Apr-17 5:39
mveRichard MacCutchan19-Apr-17 5:39 
GeneralRe: Sharing a structure between a console application and a static library Pin
Chris Losinger19-Apr-17 5:44
professionalChris Losinger19-Apr-17 5:44 
GeneralRe: Sharing a structure between a console application and a static library Pin
Richard MacCutchan19-Apr-17 6:09
mveRichard MacCutchan19-Apr-17 6:09 
GeneralRe: Sharing a structure between a console application and a static library Pin
Munchies_Matt19-Apr-17 5:18
Munchies_Matt19-Apr-17 5:18 
GeneralRe: Sharing a structure between a console application and a static library Pin
Chris Losinger19-Apr-17 5:22
professionalChris Losinger19-Apr-17 5:22 
GeneralRe: Sharing a structure between a console application and a static library Pin
Munchies_Matt19-Apr-17 5:38
Munchies_Matt19-Apr-17 5:38 
GeneralRe: Sharing a structure between a console application and a static library Pin
Chris Losinger19-Apr-17 5:45
professionalChris Losinger19-Apr-17 5:45 
QuestionCDateTimeCtrl in Windows 10 Pin
Member 1313216716-Apr-17 19:24
Member 1313216716-Apr-17 19:24 
SuggestionRe: CDateTimeCtrl in Windows 10 Pin
Richard MacCutchan16-Apr-17 21:35
mveRichard MacCutchan16-Apr-17 21:35 
QuestionRe: CDateTimeCtrl in Windows 10 Pin
David Crow17-Apr-17 3:54
David Crow17-Apr-17 3:54 
AnswerRe: CDateTimeCtrl in Windows 10 Pin
leon de boer17-Apr-17 17:41
leon de boer17-Apr-17 17:41 
GeneralRe: CDateTimeCtrl in Windows 10 Pin
Member 150124918-Apr-17 21:37
Member 150124918-Apr-17 21:37 
GeneralRe: CDateTimeCtrl in Windows 10 Pin
leon de boer19-Apr-17 9:56
leon de boer19-Apr-17 9:56 

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.