User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 397,851 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,341 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 1732 | Replies: 3
Reply
Join Date: Jul 2004
Posts: 31
Reputation: Sukhbir is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
Sukhbir Sukhbir is offline Offline
Light Poster

Solution ambigious part 5

  #1  
Aug 6th, 2004
LOOK THE FOLLOWING STATEMENT

int *p[]();

PLS TELL ME THE MEANING OF THIS STATEMENT.& WHERE WE USE THIS STATEMENT.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Posts: 3,462
Reputation: Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light 
Rep Power: 16
Solved Threads: 138
Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: ambigious part 5

  #2  
Aug 6th, 2004
I believe it is invalid syntax. Did you mean a declaration for an array of pointers returning int and taking no parameters?
#include <iostream>
  
  int foo() { std::cout << "foo\n"; return 0; }
  int bar() { std::cout << "bar\n"; return 0; }
  
  int main()
  {
     int (*p[])() = {foo,bar};
     p[0]();
     p[1]();
     return 0;
  }
  
  /* my output
  foo
  bar
  */
Reply With Quote  
Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,333
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Rep Power: 11
Solved Threads: 101
Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: ambigious part 5

  #3  
Aug 6th, 2004
Sukhbir:

Can you please stop naming your threads "Ambiguous part #", and start naming them with a title that indicates what you're asking?

One of the keys to getting responses to your posts is to post a relevant topic to your question. "Ambiguous part #" is, well, ambiguous.
Alex Cavnar, aka alc6379
Reply With Quote  
Join Date: May 2004
Posts: 250
Reputation: FireNet will become famous soon enough FireNet will become famous soon enough 
Rep Power: 6
Solved Threads: 6
FireNet's Avatar
FireNet FireNet is offline Offline
Posting Whiz in Training

Re: ambigious part 5

  #4  
Aug 6th, 2004
Good point too,the fourms are getting filled.Hey there's plenty of space in an ocean anyway.
See what you can, remember what you need

Fourzon | Earn via Coding
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C++ Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 8:15 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC