Hi Victor. Thanks for your help.

Regards
Paulo

--- In [EMAIL PROTECTED], "Victor A. Wagner Jr." <[EMAIL PROTECTED]>
wrote:
> you don't have any useful information about the size of a in f()
>
> At Friday 2004-11-05 13:31, you wrote:
>
>
> >Hi all
> >
> >I'm a newbie in C/C++ and I have a trouble in the following code.
> >
> >#include <iostream>
> >using namespace std;
> >
> >void f(char *a[])
> >{
> >    int i = sizeof(a) / sizeof(a[0]);
> >    cout << "sizeof(a) / sizeof(a[0]) = " << i << endl;
> >}
> >
> >int main(int argc, char **argv)
> >{
> >    char *v[] = {"jan", "fev", "mar"};
> >    f(v);
> >
> >    int i = sizeof(v) / sizeof(v[0]);
> >    cout << "sizeof(v) / sizeof(v[0]) = " << i << endl;
> >}
> >
> >When this program is executed the output is:
> >
> >sizeof(a) / sizeof(a[0]) = 1
> >
> >sizeof(v) / sizeof(v[0]) = 3
> >
> >Why? Any help will be welcome
> >
> >Thanks in advance
> >Paulo
> >
> >
> >
> >
> >
> >
> >To unsubscribe, send a blank message to
> ><mailto:[EMAIL PROTECTED]>.
> >Yahoo! Groups Links
> >
> >
> >
> >
>
> Victor A. Wagner Jr.      http://rudbek.com
> The five most dangerous words in the English language:
>                "There oughta be a law"





To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=:HM/A=2128215/rand=891920190


Yahoo! Groups Links

Reply via email to