Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Urgent Plz.. Help needed on converting 12 bit greylevel... Pin
Mad__10-Oct-04 23:22
Mad__10-Oct-04 23:22 
GeneralRe: Urgent Plz.. Help needed on converting 12 bit greylevel... Pin
normanS11-Oct-04 2:52
normanS11-Oct-04 2:52 
GeneralRe: Urgent Plz.. Help needed on converting 12 bit greylevel... Pin
Kiran Satish11-Oct-04 6:00
Kiran Satish11-Oct-04 6:00 
GeneralLSB_MSB format Pin
normanS11-Oct-04 3:01
normanS11-Oct-04 3:01 
GeneralRe: LSB_MSB format Pin
Kiran Satish11-Oct-04 5:59
Kiran Satish11-Oct-04 5:59 
GeneralRe: LSB_MSB format Pin
normanS11-Oct-04 20:35
normanS11-Oct-04 20:35 
QuestionDirectShow change resolution on the fly? Pin
Indrawati10-Oct-04 14:13
Indrawati10-Oct-04 14:13 
Generalstructure with vector as a member Pin
gahziman10-Oct-04 13:30
gahziman10-Oct-04 13:30 
Hello:
I have this interesting problem...
I have to use a c-library that contains a function that is defined as follow:

int func(char * cpData);

I have been using a structure accually a nested structure as follows

struct A
{
char cString;
char cAnotherstring;
}sA;

struct B
{
int iIndex;
float fData[MAXDATA];

}sB;

struct C
{
struct A nA;
struct B nB[8];

}sStream;


I can call this structure with now problems
using func((char *) &sStream);


I wanted to use a vector for the float fData

such as the struct B is as follows:

struct B
{
int iIndex;
vector< float> fData;
} sB;


when I call the function I getting garbaged data.
I do take care of reserving the data size.
In fact I can see that the correct data is there just prior to calling
this legecy function.

Is there a way I can convert somehow to c-array which the function understand
but be able to use the advantage of the vector.

Your speedy reply wiill be vey much appreciated.
GeneralRe: structure with vector as a member Pin
Mad__10-Oct-04 23:25
Mad__10-Oct-04 23:25 
GeneralRe: structure with vector as a member Pin
gahziman11-Oct-04 0:34
gahziman11-Oct-04 0:34 
GeneralRe: structure with vector as a member Pin
Mad__11-Oct-04 0:39
Mad__11-Oct-04 0:39 
GeneralRe: structure with vector as a member Pin
Bob Stanneveld11-Oct-04 3:56
Bob Stanneveld11-Oct-04 3:56 
GeneralPlease help with CString to float. Pin
Jochum Wittebrood10-Oct-04 10:29
Jochum Wittebrood10-Oct-04 10:29 
GeneralRe: Please help with CString to float. Pin
Jochum Wittebrood10-Oct-04 11:07
Jochum Wittebrood10-Oct-04 11:07 
GeneralRe: Please help with CString to float. Pin
Christian Graus10-Oct-04 11:54
protectorChristian Graus10-Oct-04 11:54 
GeneralRe: Please help with CString to float. Pin
Jochum Wittebrood10-Oct-04 14:32
Jochum Wittebrood10-Oct-04 14:32 
GeneralRe: Please help with CString to float. Pin
Christian Graus10-Oct-04 14:41
protectorChristian Graus10-Oct-04 14:41 
GeneralRe: Please help with CString to float. Pin
Michael Dunn10-Oct-04 14:49
sitebuilderMichael Dunn10-Oct-04 14:49 
GeneralRe: Please help with CString to float. Pin
toxcct10-Oct-04 21:00
toxcct10-Oct-04 21:00 
GeneralRe: Please help with CString to float. Pin
callisthenes11-Oct-04 3:57
callisthenes11-Oct-04 3:57 
GeneralRe: Please help with CString to float. Pin
Jochum Wittebrood12-Oct-04 12:43
Jochum Wittebrood12-Oct-04 12:43 
GeneralRuntime ComboBox Question Pin
otrcomm10-Oct-04 9:04
otrcomm10-Oct-04 9:04 
GeneralRe: Runtime ComboBox Question Pin
Antti Keskinen10-Oct-04 9:23
Antti Keskinen10-Oct-04 9:23 
GeneralRe: Runtime ComboBox Question Pin
otrcomm10-Oct-04 12:03
otrcomm10-Oct-04 12:03 
GeneralRe: Runtime ComboBox Question - Never Mind Pin
otrcomm10-Oct-04 12:56
otrcomm10-Oct-04 12: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.