Click here to Skip to main content
15,889,479 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.

 
GeneralRe: C declarations are half backward Pin
honey the codewitch30-Nov-20 5:51
mvahoney the codewitch30-Nov-20 5:51 
GeneralRe: C declarations are half backward Pin
BernardIE531730-Nov-20 6:02
BernardIE531730-Nov-20 6:02 
GeneralRe: C declarations are half backward Pin
honey the codewitch30-Nov-20 6:04
mvahoney the codewitch30-Nov-20 6:04 
GeneralRe: C declarations are half backward Pin
BernardIE531730-Nov-20 6:22
BernardIE531730-Nov-20 6:22 
GeneralRe: C declarations are half backward Pin
honey the codewitch30-Nov-20 6:24
mvahoney the codewitch30-Nov-20 6:24 
GeneralRe: C declarations are half backward Pin
BernardIE531730-Nov-20 8:38
BernardIE531730-Nov-20 8:38 
GeneralRe: C declarations are half backward Pin
Stuart Dootson30-Nov-20 5:53
professionalStuart Dootson30-Nov-20 5:53 
GeneralRe: C declarations are half backward Pin
Stuart Dootson30-Nov-20 5:52
professionalStuart Dootson30-Nov-20 5:52 
honey the codewitch wrote:
I think it's inconsistent, and I think the array specifier should have been declared with the type since it's essentially a type modifier like * and &


One thing it's not is inconsistent - the pointer modifier belongs with the variable, not the type. For example, the following fragment declares a pointer to integer variable and an integer variable.
int *pa, a;

See this Godbolt...

One option, were you using C++...
template<class T, size_t N>
using Array = T[N];

template<class T>
using Ptr = T*;

Array<int, 10> test_array;

Ptr<int> test_pointer;
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: C declarations are half backward Pin
honey the codewitch30-Nov-20 5:54
mvahoney the codewitch30-Nov-20 5:54 
GeneralRe: C declarations are half backward Pin
Member 1330167930-Nov-20 8:18
Member 1330167930-Nov-20 8:18 
GeneralRe: C declarations are half backward Pin
honey the codewitch30-Nov-20 8:26
mvahoney the codewitch30-Nov-20 8:26 
GeneralRe: C declarations are half backward Pin
Member 1330167930-Nov-20 8:49
Member 1330167930-Nov-20 8:49 
GeneralRe: C declarations are half backward Pin
harold aptroot30-Nov-20 9:50
harold aptroot30-Nov-20 9:50 
GeneralRe: C declarations are half backward Pin
honey the codewitch30-Nov-20 10:10
mvahoney the codewitch30-Nov-20 10:10 
GeneralRe: C declarations are half backward Pin
BernardIE531730-Nov-20 21:46
BernardIE531730-Nov-20 21:46 
GeneralRe: C declarations are half backward Pin
harold aptroot1-Dec-20 1:33
harold aptroot1-Dec-20 1:33 
GeneralRe: C declarations are half backward Pin
BernardIE53171-Dec-20 7:30
BernardIE53171-Dec-20 7:30 
GeneralRe: C declarations are half backward Pin
Julie77730-Nov-20 13:36
Julie77730-Nov-20 13:36 
GeneralRe: C declarations are half backward Pin
BernardIE531730-Nov-20 22:41
BernardIE531730-Nov-20 22:41 
GeneralRe: C declarations are half backward Pin
mike@codeproject3-Dec-20 17:44
mike@codeproject3-Dec-20 17:44 
GeneralDo you know / trust this site? Pin
Nelek28-Nov-20 5:28
protectorNelek28-Nov-20 5:28 
GeneralRe: Do you know / trust this site? Pin
OriginalGriff28-Nov-20 6:25
mveOriginalGriff28-Nov-20 6:25 
GeneralRe: Do you know / trust this site? Pin
Nelek28-Nov-20 10:02
protectorNelek28-Nov-20 10:02 
GeneralRe: Do you know / trust this site? Pin
OriginalGriff28-Nov-20 10:15
mveOriginalGriff28-Nov-20 10:15 
GeneralRe: Do you know / trust this site? Pin
dandy7228-Nov-20 11:19
dandy7228-Nov-20 11:19 

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.