Click here to Skip to main content
15,914,384 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to read/process locked files? Pin
David Crow18-Jan-10 10:29
David Crow18-Jan-10 10:29 
AnswerRe: How to read/process locked files? Pin
ZystemsK18-Jan-10 11:19
ZystemsK18-Jan-10 11:19 
AnswerRe: How to read/process locked files? Pin
Peter Weyzen18-Jan-10 14:09
Peter Weyzen18-Jan-10 14:09 
GeneralRe: How to read/process locked files? Pin
ZystemsK19-Jan-10 3:09
ZystemsK19-Jan-10 3:09 
GeneralRe: How to read/process locked files? Pin
ZystemsK19-Jan-10 4:19
ZystemsK19-Jan-10 4:19 
QuestionReading a file from disk in C Pin
Danzy8318-Jan-10 3:07
Danzy8318-Jan-10 3:07 
AnswerRe: Reading a file from disk in C Pin
Covean18-Jan-10 3:20
Covean18-Jan-10 3:20 
GeneralRe: Reading a file from disk in C Pin
Danzy8318-Jan-10 3:28
Danzy8318-Jan-10 3:28 
GeneralRe: Reading a file from disk in C Pin
Covean18-Jan-10 3:37
Covean18-Jan-10 3:37 
AnswerRe: Reading a file from disk in C Pin
CPallini18-Jan-10 3:23
mveCPallini18-Jan-10 3:23 
GeneralRe: Reading a file from disk in C Pin
Danzy8318-Jan-10 3:36
Danzy8318-Jan-10 3:36 
GeneralRe: Reading a file from disk in C Pin
Electron Shepherd18-Jan-10 3:43
Electron Shepherd18-Jan-10 3:43 
GeneralRe: The _stat function Pin
Danzy8318-Jan-10 3:56
Danzy8318-Jan-10 3:56 
GeneralRe: The _stat function Pin
Electron Shepherd18-Jan-10 3:59
Electron Shepherd18-Jan-10 3:59 
GeneralThanks CPallini and Covean Pin
Danzy8318-Jan-10 3:53
Danzy8318-Jan-10 3:53 
GeneralRe: Thanks CPallini and Covean Pin
CPallini18-Jan-10 6:56
mveCPallini18-Jan-10 6:56 
GeneralRe: Thanks CPallini and Covean Pin
Rozis18-Jan-10 11:32
Rozis18-Jan-10 11:32 
AnswerRe: Reading a file from disk in C Pin
Joe Woodbury18-Jan-10 7:14
professionalJoe Woodbury18-Jan-10 7:14 
QuestionUsing Zend library in vc++ Pin
Ash_VCPP18-Jan-10 3:02
Ash_VCPP18-Jan-10 3:02 
AnswerRe: Using Zend library in vc++ Pin
Frank Seidler18-Jan-10 8:44
Frank Seidler18-Jan-10 8:44 
GeneralRe: Using Zend library in vc++ Pin
Ash_VCPP20-Jan-10 1:59
Ash_VCPP20-Jan-10 1:59 
Questionarray of differents types (possible?) Pin
George Nistor18-Jan-10 2:28
George Nistor18-Jan-10 2:28 
Hi,

Now I use a driver (first part of the code) - no changes possible.
I have to use something like a message processing and because I'm unable to use an array of the internal buffers of the driver -> I use more then 10 function with the same code.

here is my code
I would like to use a vector of messages (message0, message1 ..).

any other ideea is welcome of grouping these data types.

thanks

<pre>// Gateway_array.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

typedef struct
{
   unsigned char signal7 : 8;
   unsigned char signal6 : 8;
   unsigned char signal5 : 8;
   unsigned char signal4 : 8;
   unsigned char signal3 : 8;
   unsigned char signal2 : 8;
   unsigned char signal1 : 8;
   unsigned char signal0 : 8;
} msgType0;


typedef union
{
   unsigned char _c[8];
   msgType0 msg0_0;
} buf0;


buf0   message0;



typedef struct
{
   unsigned char signal7 : 8;
   unsigned char signal6 : 8;
   unsigned char signal5 : 8;
   unsigned char signal4 : 8;
   unsigned char signal3 : 8;
   unsigned char signal2 : 8;
   unsigned char signal1 : 8;
   unsigned char signal0 : 8;
} msgType1;


typedef union
{
   unsigned char _c[8];
   msgType1 msg0_1;
} buf1;


buf1   message1;
/// ................................
/// UP is the Driver ..   No changes possible
// X 8 times


typedef struct
{
   unsigned char signal7 : 8;
   unsigned char signal6 : 8;
   unsigned char signal5 : 8;
   unsigned char signal4 : 8;
   unsigned char signal3 : 8;
   unsigned char signal2 : 8;
   unsigned char signal1 : 8;
   unsigned char signal0 : 8;
} msgType;


typedef union
{
   unsigned char _c[8];
   msgType msg;
} type_array;

type_array   Vector[2];   // i would like to use a vector like this one

int main(int argc, char* argv[])
{
  
   Vector[0] = message0; //error when using it
  
   return 0;
}

</pre>
QuestionRe: array of differents types (possible?) Pin
CPallini18-Jan-10 2:44
mveCPallini18-Jan-10 2:44 
AnswerRe: array of differents types (possible?) Pin
George Nistor18-Jan-10 20:57
George Nistor18-Jan-10 20:57 
GeneralRe: array of differents types (possible?) Pin
CPallini18-Jan-10 21:05
mveCPallini18-Jan-10 21:05 

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.