Click here to Skip to main content
13,898,968 members

C / C++ / MFC

 
GeneralRe: How can I initialize an array of structs where the array size is set at compile time? Pin
arnold_w6-Apr-18 1:30
memberarnold_w6-Apr-18 1:30 
AnswerRe: How can I initialize an array of structs where the array size is set at compile time? Pin
Jochen Arndt5-Apr-18 23:36
mveJochen Arndt5-Apr-18 23:36 
GeneralRe: How can I initialize an array of structs where the array size is set at compile time? Pin
arnold_w6-Apr-18 0:32
memberarnold_w6-Apr-18 0:32 
GeneralRe: How can I initialize an array of structs where the array size is set at compile time? Pin
Jochen Arndt6-Apr-18 1:13
mveJochen Arndt6-Apr-18 1:13 
AnswerRe: How can I initialize an array of structs where the array size is set at compile time? Pin
Joe Woodbury6-Apr-18 6:06
professionalJoe Woodbury6-Apr-18 6:06 
Questionwhy ( const char *ptr = string literal ) works but ( const string *ptr = string literal ) doesn't ? Pin
Tarun Jha3-Apr-18 7:53
memberTarun Jha3-Apr-18 7:53 
AnswerRe: why ( const char *ptr = string literal ) works but ( const string *ptr = string literal ) doesn't ? Pin
Victor Nijegorodov3-Apr-18 9:03
memberVictor Nijegorodov3-Apr-18 9:03 
AnswerRe: why ( const char *ptr = string literal ) works but ( const string *ptr = string literal ) doesn't ? Pin
David Crow3-Apr-18 10:41
memberDavid Crow3-Apr-18 10:41 
Tarun Jha wrote:
...but it is a collection of characters, so how is it a char ?
The variable ptr is a pointer to a collection of char-acters, be it 1 or 100.

Tarun Jha wrote:
...then why it is called string literal ?
Like anything holding quotation marks apart, they are literally those characters. They haven't been modified, translated, obtained from some other place, coerced, etc. If you look inside the compiled file, you will see those characters, literally.

"One man's wage rise is another man's price increase." - Harold Wilson

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles


AnswerRe: why ( const char *ptr = string literal ) works but ( const string *ptr = string literal ) doesn't ? Pin
leon de boer3-Apr-18 13:48
memberleon de boer3-Apr-18 13:48 
QuestionHelp compiling OpenCV Pin
_Flaviu2-Apr-18 23:25
member_Flaviu2-Apr-18 23:25 
AnswerRe: Help compiling OpenCV Pin
Victor Nijegorodov3-Apr-18 2:04
memberVictor Nijegorodov3-Apr-18 2:04 
GeneralRe: Help compiling OpenCV Pin
_Flaviu3-Apr-18 2:08
member_Flaviu3-Apr-18 2:08 
GeneralRe: Help compiling OpenCV Pin
_Flaviu3-Apr-18 2:08
member_Flaviu3-Apr-18 2:08 
GeneralRe: Help compiling OpenCV Pin
Victor Nijegorodov3-Apr-18 4:08
memberVictor Nijegorodov3-Apr-18 4:08 
AnswerRe: Help compiling OpenCV Pin
Jochen Arndt3-Apr-18 23:02
mveJochen Arndt3-Apr-18 23:02 
QuestionCreating a Simple Employee Database using inheritance in c++. Pin
Tarun Jha2-Apr-18 0:53
memberTarun Jha2-Apr-18 0:53 
SuggestionRe: Creating a Simple Employee Database using inheritance in c++. Pin
Richard MacCutchan2-Apr-18 0:57
protectorRichard MacCutchan2-Apr-18 0:57 
GeneralRe: Creating a Simple Employee Database using inheritance in c++. Pin
Tarun Jha2-Apr-18 0:59
memberTarun Jha2-Apr-18 0:59 
GeneralRe: Creating a Simple Employee Database using inheritance in c++. Pin
Richard MacCutchan2-Apr-18 1:10
protectorRichard MacCutchan2-Apr-18 1:10 
GeneralRe: Creating a Simple Employee Database using inheritance in c++. Pin
Tarun Jha2-Apr-18 2:32
memberTarun Jha2-Apr-18 2:32 
AnswerRe: Creating a Simple Employee Database using inheritance in c++. Pin
Richard MacCutchan2-Apr-18 1:19
protectorRichard MacCutchan2-Apr-18 1:19 
GeneralRe: Creating a Simple Employee Database using inheritance in c++. Pin
Tarun Jha2-Apr-18 1:19
memberTarun Jha2-Apr-18 1:19 
GeneralRe: Creating a Simple Employee Database using inheritance in c++. Pin
Richard MacCutchan2-Apr-18 1:26
protectorRichard MacCutchan2-Apr-18 1:26 
QuestionIs it possible to link a DLL in another DLL and call its functions? Pin
manoharbalu2-Apr-18 0:29
membermanoharbalu2-Apr-18 0:29 
AnswerRe: Is it possible to link a DLL in another DLL and call its functions? Pin
Richard MacCutchan2-Apr-18 0:59
protectorRichard MacCutchan2-Apr-18 0:59 

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.


Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.190306.1 | Last Updated 21 Mar 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid