Click here to Skip to main content
14,838,821 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralWhy does most C/C++ developer prefers char *c instead of char* c? Pin
.jpg26-May-18 2:20
Member.jpg26-May-18 2:20 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 2:30
MemberUser 1106097926-May-18 2:30 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Mike Hankey26-May-18 2:57
professionalMike Hankey26-May-18 2:57 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
lopatir26-May-18 3:12
Memberlopatir26-May-18 3:12 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 3:22
MemberUser 1106097926-May-18 3:22 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
lopatir26-May-18 4:21
Memberlopatir26-May-18 4:21 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 4:27
MemberUser 1106097926-May-18 4:27 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Richard MacCutchan26-May-18 4:46
mveRichard MacCutchan26-May-18 4:46 
Lopatir is correct. The way to read the declaration
char *c

is: c (the name of the variable)
is a pointer (the * prefix)
to a character (the type)
where the pointer property actually belongs to the variable, not the type.

Having said that I always write:
char* c

Wink | ;)
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 4:53
MemberUser 1106097926-May-18 4:53 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Richard MacCutchan26-May-18 5:17
mveRichard MacCutchan26-May-18 5:17 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
User 1106097926-May-18 5:21
MemberUser 1106097926-May-18 5:21 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Gerry Schmitz29-May-18 6:59
mveGerry Schmitz29-May-18 6:59 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Ron Anders26-May-18 3:25
MemberRon Anders26-May-18 3:25 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
jschell26-May-18 6:33
Memberjschell26-May-18 6:33 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
lopatir26-May-18 8:51
Memberlopatir26-May-18 8:51 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
jschell9-Jun-18 5:35
Memberjschell9-Jun-18 5:35 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
PIEBALDconsult26-May-18 7:30
professionalPIEBALDconsult26-May-18 7:30 
PraiseRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
CPallini26-May-18 11:02
mveCPallini26-May-18 11:02 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
david garlisch29-May-18 16:47
Memberdavid garlisch29-May-18 16:47 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
PIEBALDconsult30-May-18 5:56
professionalPIEBALDconsult30-May-18 5:56 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Chris Maunder26-May-18 7:48
cofounderChris Maunder26-May-18 7:48 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
lopatir26-May-18 8:55
Memberlopatir26-May-18 8:55 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Chris Maunder26-May-18 10:27
cofounderChris Maunder26-May-18 10:27 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
Member 966767828-May-18 22:02
MemberMember 966767828-May-18 22:02 
GeneralRe: Why does most C/C++ developer prefers char *c instead of char* c? Pin
PhM3329-May-18 3:35
professionalPhM3329-May-18 3:35 

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.