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
MODIFY_LDT(2)						     Linux Programmer's Manual						     MODIFY_LDT(2)

NAME
modify_ldt - get or set ldt SYNOPSIS
#include <linux/ldt.h> #include <linux/unistd.h> _syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount ) int modify_ldt(int func, void *ptr, unsigned long bytecount); DESCRIPTION
modify_ldt reads or writes the local descriptor table (ldt) for a process. The ldt is a per-process memory management table used by the i386 processor. For more information on this table, see an Intel 386 processor handbook. When func is 0, modify_ldt reads the ldt into the memory pointed to by ptr. The number of bytes read is the smaller of bytecount and the actual size of the ldt. When func is 1, modify_ldt modifies one ldt entry. ptr points to a modify_ldt_ldt_s structure and bytecount must equal the size of this structure. RETURN VALUE
On success, modify_ldt returns either the actual number of bytes read (for reading) or 0 (for writing). On failure, modify_ldt returns -1 and sets errno. ERRORS
ENOSYS func is neither 0 nor 1. EINVAL ptr is 0, or func is 1 and bytecount is not equal to the size of the structure modify_ldt_ldt_s, or func is 1 and the new ldt entry has invalid values. EFAULT ptr points outside the address space. CONFORMING TO
This call in Linux-specific and should not be used in programs intended to be portable. SEE ALSO
vm86(2) Linux 1.3.6 1995-07-22 MODIFY_LDT(2)
All times are GMT -4. The time now is 09:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy