PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.c > valid code
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
valid code

Réponse
 
LinkBack Outils de la discussion
Vieux 27/05/2008, 16h31   #1
stumpedatwork@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut valid code

is this valid int (*f)(int (*[*])[]) c?
  Réponse avec citation
Vieux 27/05/2008, 17h28   #2
Jens Thoms Toerring
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: valid code

stumpedatwork@gmail.com wrote:
> is this valid int (*f)(int (*[*])[]) c?


Not as it is;-) First a question: is the 'c' at the end a
typo or is it supposed to be part of that? If not a de-
finintion of a variable 'f' as

int (*f)(int (*[])[]);

is valid. It defines 'f' to be a pointer to a function re-
turning int and taking as its only argument an array of
pointers to arrays of int.

If you have a closer look you will notice that I removed
one '*' from your mix, the one between '[' and ']' in
the argument. As far as I understand the C99 language it
stands for a variable length array. If that is correct
putting back in the '*' should be ok if you have a C99
compliant compiler since it would just change the mea-
ning of the argument part from "an array of pointers to
arrays of int" to "a variable length array of pointers
to arrays of int".
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
  Réponse avec citation
Vieux 03/06/2008, 03h59   #3
stumpedatwork@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: valid code

Thank you Jens. It was a typo. :-)

It was the c99 vla thart puzzled me.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h06.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10396 seconds with 11 queries