Click here to Skip to main content
15,886,137 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: read image raw type of gray scale 16bit and height=512 ,width=512 Pin
David Crow9-Apr-15 9:01
David Crow9-Apr-15 9:01 
AnswerRe: read image raw type of gray scale 16bit and height=512 ,width=512 Pin
dahraoui12-May-15 6:19
dahraoui12-May-15 6:19 
Question#include directive in switch case if clause Pin
elelont28-Apr-15 22:30
elelont28-Apr-15 22:30 
AnswerRe: #include directive in switch case if clause Pin
Richard MacCutchan8-Apr-15 22:54
mveRichard MacCutchan8-Apr-15 22:54 
AnswerRe: #include directive in switch case if clause Pin
Jochen Arndt8-Apr-15 23:15
professionalJochen Arndt8-Apr-15 23:15 
AnswerRe: #include directive in switch case if clause Pin
CPallini8-Apr-15 23:28
mveCPallini8-Apr-15 23:28 
AnswerRe: #include directive in switch case if clause Pin
jschell9-Apr-15 12:01
jschell9-Apr-15 12:01 
QuestionHelp with double pointers and const Pin
elelont28-Apr-15 21:18
elelont28-Apr-15 21:18 
Hi,
i cannot figure this out:
C
typedef struct
{
  int a;
  int b;
} CARPIC;

const CARPIC const* CarPics[] =
{
  &Audi,
  &BMW,
  &Bugatti,
}

// Get function
void GetCarPicture(CARPIC** carPicture)
{
  int carId= GetCarId(); // Lets say, returns 2
  *carPicture = CarPics[carId];
}

// Using the function
CARPIC* car;
GetCarPicture(&car);

I get the warning:
C
warning: assignment discards qualifiers from pointer target type

I tried to add the const keyword to the GetCarPicture function parameter but could not figure out where to add it. I need to get the pointer to the const car picture.

Regards.
AnswerRe: Help with double pointers and const Pin
Richard MacCutchan8-Apr-15 22:20
mveRichard MacCutchan8-Apr-15 22:20 
AnswerRe: Help with double pointers and const Pin
CPallini8-Apr-15 22:21
mveCPallini8-Apr-15 22:21 
GeneralRe: Help with double pointers and const Pin
elelont29-Apr-15 3:19
elelont29-Apr-15 3:19 
GeneralRe: Help with double pointers and const Pin
CPallini9-Apr-15 8:52
mveCPallini9-Apr-15 8:52 
GeneralRe: Help with double pointers and const Pin
Stefan_Lang10-Apr-15 0:27
Stefan_Lang10-Apr-15 0:27 
GeneralRe: Help with double pointers and const Pin
Stefan_Lang10-Apr-15 0:14
Stefan_Lang10-Apr-15 0:14 
GeneralRe: Help with double pointers and const Pin
CPallini10-Apr-15 5:16
mveCPallini10-Apr-15 5:16 
Questionrecovering storage Pin
Member 115916078-Apr-15 9:24
Member 115916078-Apr-15 9:24 
AnswerRe: recovering storage Pin
Richard MacCutchan8-Apr-15 20:20
mveRichard MacCutchan8-Apr-15 20:20 
Answer[Repost] Pin
Sascha Lefèvre8-Apr-15 20:33
professionalSascha Lefèvre8-Apr-15 20:33 
QuestionBuffer data size Pin
_Flaviu7-Apr-15 21:46
_Flaviu7-Apr-15 21:46 
AnswerRe: Buffer data size Pin
Jochen Arndt8-Apr-15 1:58
professionalJochen Arndt8-Apr-15 1:58 
GeneralRe: Buffer data size Pin
_Flaviu8-Apr-15 20:44
_Flaviu8-Apr-15 20:44 
AnswerRe: Buffer data size Pin
Richard MacCutchan8-Apr-15 2:40
mveRichard MacCutchan8-Apr-15 2:40 
Questionc graphics Pin
vinay dahiya6-Apr-15 12:07
vinay dahiya6-Apr-15 12:07 
AnswerRe: c graphics Pin
Richard MacCutchan6-Apr-15 21:00
mveRichard MacCutchan6-Apr-15 21:00 
AnswerRe: c graphics Pin
CPallini6-Apr-15 21:14
mveCPallini6-Apr-15 21:14 

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.