Sponsored Content
Top Forums Programming difference between int ** func() and int *& func() Post 91776 by linuxpenguin on Monday 5th of December 2005 01:34:31 PM
Old 12-05-2005
do you have linux installed. if yes try to use the cdecl utility

this is what i get

cdecl> explain int * *p()
declare p as function returning pointer to pointer to int
cdecl> explain int * &p()
Warning: Unsupported in C -- 'reference'
declare p as function returning reference to pointer to int
cdecl>

so int **func() is a function that returns a pointer to a pointer to int and int * & func() is a function that returns an reference to a pointer to a function, and as seen above the second statement is not supported in C, you can try it in c++ tho.
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Utilizing func keys in scripts

I would like to have the function keys available to me in my scripts. Anyone have any ideas on how to map these to functionality I design? :confused: (3 Replies)
Discussion started by: fjjlee
3 Replies

2. Shell Programming and Scripting

FLOOR Func

Hello Experts, Is there any inbuild FLOOR function to do FLOOR func in mathmetics in awk script like in FlOOR Func in C. Ex:- floor(2.9) = 2 floor(2.1) = 2 floor(2.0) = 2 floor(-2.0) = 2 floor(-2.1) = -3 floor(-2.9) =... (1 Reply)
Discussion started by: user_prady
1 Replies

3. UNIX for Dummies Questions & Answers

int open(const char *pathname, int flags, mode_t mode) doubt...

hello everybody! I want to create a file with permissions for read, write, and execute to everybody using C, so I write this code: #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> int main(){ int fileDescriptor; fileDescriptor =... (2 Replies)
Discussion started by: csnmgeek
2 Replies

4. Red Hat

Video: Spotlight on FUNC

</p>Download this video: Ogg Theora] FUNC is the brainchild of Michael DeHaan, Adrian Likins, Seth Vidal, and Greg DeKoenigsberg. In this edition of Spotlight On, Michael, Adrian, and Seth discuss how FUNC makes it easy to write commands across large numbers of machines remotely and... (0 Replies)
Discussion started by: Linux Bot
0 Replies

5. Programming

Handle int listen(int sockfd, int backlog) in TCP

Hi, from the manual listen(2): listen for connections on socket - Linux man page It has a parameter called backlog and it limits the maximum length of queue of pending list. If I set backlog to 128, is it means no more than 128 packets can be handled by server? If I have three... (3 Replies)
Discussion started by: sehang
3 Replies

6. Shell Programming and Scripting

Advanced AWK Regexp substring to int & Replace

Hi! I have a difficult problem, to step up a unknown version number in a text file, and save the file. It would be great to run script.sh and the version gets increased. Example the content of the textfile.txt hello version = x bye This include three steps 1. First find the char after... (2 Replies)
Discussion started by: Beachboy72
2 Replies

7. Shell Programming and Scripting

Bash shell script: Str(007) to int(7),increment it(8) & convert back to string(008)

Hi, I have the following requirement. There will be following text/line in a file (eg: search-build.txt) PRODUCT_VERSION="V:01.002.007.Build1234" I need to update the incremental build number (eg here 007) every time I give a build through script. I am able to search the string and get... (4 Replies)
Discussion started by: drwatson_droid
4 Replies
glutMenuStatusFunc(3GLUT)					       GLUT						 glutMenuStatusFunc(3GLUT)

NAME
glutMenuStatusFunc - sets the global menu status callback. SYNTAX
#include <GLUT/glut.h> void glutMenuStatusFunc(void (*func)(int status, int x, int y)); void glutMenuStateFunc(void (*func)(int status)); ARGUMENTS
func The new menu status (or state) callback function. DESCRIPTION
glutMenuStatusFunc sets the global menu status callback so a GLUT program can determine when a menu is in use or not. When a menu status callback is registered, it will be called with the value GLUT_MENU_IN_USE for its value parameter when pop-up menus are in use by the user; and the callback will be called with the value GLUT_MENU_NOT_IN_USE for its status parameter when pop-up menus are no longer in use. The x and y parameters indicate the location in window coordinates of the button press that caused the menu to go into use, or the location where the menu was released (may be outside the window). The func parameter names the callback function. Other callbacks continue to operate (except mouse motion callbacks) when pop-up menus are in use so the menu status callback allows a program to suspend animation or other tasks when menus are in use. The cascading and unmapping of sub-menus from an initial pop-up menu does not generate menu status callbacks. There is a single menu status callback for GLUT. When the menu status callback is called, the current menu will be set to the initial pop-up menu in both the GLUT_MENU_IN_USE and GLUT_MENU_NOT_IN_USE cases. The current window will be set to the window from which the initial menu was popped up from, also in both cases. Passing NULL to glutMenuStatusFunc disables the generation of the menu status callback. glutMenuStateFunc is a deprecated version of the glutMenuStatusFunc routine. The only difference is glutMenuStateFunc callback prototype does not deliver the two additional x and y coordinates. SEE ALSO
glutCreateMenu, glutCreateWindow AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutMenuStatusFunc(3GLUT)
All times are GMT -4. The time now is 12:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy