Sponsored Content
Top Forums Programming How to Declare an array of function pointers? Post 303018169 by spflanze on Wednesday 30th of May 2018 04:44:45 PM
Old 05-30-2018
Those functions are class members. I did not know that pointers cannot be gotten for class member functions. That was the problem. Thanks. Smilie
 

10 More Discussions You Might Find Interesting

1. Programming

Sharing C++ Objects with virtual function table pointers

I am pondering the next question: Can I safely sare objects that have virtual functions (i.e. have virtual function table pointers) between two processes ? Where will the pointers point to in each process ? What I am afraid of is that in the creating process the pointer will indeed point to... (2 Replies)
Discussion started by: Seeker
2 Replies

2. Programming

Regarding Function and Pointers.

HI, Here is some thing that is puzzling me from a long time. Can some body explain me this with example. The question is :- What is the difference between function pointer and pointer to a function. Where do we actually use the function pointers and pointer to functions. Thanks in... (0 Replies)
Discussion started by: S.Vishwanath
0 Replies

3. Shell Programming and Scripting

declare, assign variables using array, counter, loop

using bash Tru64... converting DCL to shell... any tips to make this work would be greatly appreciated. Below is my failed attempt to assign command line input to variables by first declaring an array. I use a counter to create unique variables in a loop through the array. I need to call... (3 Replies)
Discussion started by: egkumpe
3 Replies

4. Programming

Pointers and array

hi all, let say i have a pointer exit, and this exit will store some value. how can i store the value that the pointer points to into an array and then print them out from the array. thanks in advance (2 Replies)
Discussion started by: dianazheng
2 Replies

5. Shell Programming and Scripting

How to declare an array to take more than 10,000 characters

Hi Guys Need some help I am reading the string values from the text files into the shell script and had them feed into array I have declared an associative array as TYPE t_user_id_tab IS TABLE OF VARCHAR2(3000);\n my_user_id t_user_id_tab;\n varchar2 is limiting me to take only... (0 Replies)
Discussion started by: pinky
0 Replies

6. Programming

Problem with array of pointers

Hi All, I am using the array of pointers and storing the address of string.This is a global list. So i am using extern to give the reference of this list to another file and using reading the data from this string. But list is being corrupted and string is missing some characters in... (2 Replies)
Discussion started by: lovevijay03
2 Replies

7. Programming

Traversing in Array of pointers

Please find the below program. the requirement and description of the program also given: ganesh@ubuntu:~/my_programs/c/letusc/chap9$ cat fa.c.old /* Program : write a program to count the number of 'e' in thefollowing array of pointers to strings: char *s = { "We will teach you how... (12 Replies)
Discussion started by: ramkrix
12 Replies

8. Programming

question about Function pointers

Hello forum memebers As iam new to C++ programming i am little bit confuse to understand the function pointers. Please help me to understand the function pointers with examples are suggest me good site for this,Its better if it have picturial representation ie any PPTS available in Google.... (2 Replies)
Discussion started by: rajkumar_g
2 Replies

9. Programming

Pointers and array

Hello, I read from a book exercise for a challenge. How to print out each letter of char array a by two different pointers pa and ppa in the example? I have tried my code for letter "r" by testing without full understanding as only the first one worked. #include<stdio.h> int main() { char... (17 Replies)
Discussion started by: yifangt
17 Replies

10. UNIX for Dummies Questions & Answers

How to declare an array in UNIX and print the elements with tab delimits?

Hello, In a shell script, I want to declare an array and subsequently print the elements with tab delimits. My array has the following structure and arbitrary elements: myArray=('fgh' 'ijk' 'xyz' 'abc'); Next, I would like to print it with a '\n' at the end. Thanks for your input! ... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
XmGetSecondaryResourceData(library call)								  XmGetSecondaryResourceData(library call)

NAME
XmGetSecondaryResourceData -- A function that provides access to secondary widget resource data SYNOPSIS
#include <Xm/Xm.h> Cardinal XmGetSecondaryResourceData( WidgetClass widget_class, XmSecondaryResourceData **secondary_data_return); DESCRIPTION
Some Motif widget classes (such as Gadget, Text, and VendorShell) have resources that are not accessible through the functions XtGetRe- sourceList and XtGetConstraintResourceList. In order to retrieve the descriptions of these resources, an application must use XmGetSec- ondaryResourceData. When a widget class has such resources, this function provides descriptions of the resources in one or more data structures. XmGetSec- ondaryResourceData takes a widget class argument and returns the number of these data structures associated with the widget class. If the return value is greater than 0 (zero), the function allocates and fills an array of pointers to the corresponding data structures. It returns this array at the address that is the value of the secondary_data_return argument. The type XmSecondaryResourceData is a pointer to a structure with two members that are useful to an application: resources, of type XtRe- sourceList, and num_resources, of type Cardinal. The resources member is a list of the widget resources that are not accessible using Xt functions. The num_resources member is the length of the resources list. If the return value is greater than 0 (zero), XmGetSecondaryResourceData allocates memory that the application must free. Use XtFree to free the resource list in each structure (the value of the resources member), the structures themselves, and the array of pointers to the structures (the array whose address is secondary_data_return). widget_class Specifies the widget class for which secondary resource data is to be retrieved. secondary_data_return Specifies a pointer to an array of XmSecondaryResourceData pointers to be returned by this function. If the widget class has no secondary resource data, for example, if the value returned by the function is 0 (zero), the function returns no meaningful value for this argument. RETURN
Returns the number of secondary resource data structures associated with this widget class. EXAMPLE
The following example uses XmGetSecondaryResourceData to print the names of the secondary resources of the Motif Text widget and then frees the data allocated by the function: XmSecondaryResourceData * block_array; Cardinal num_blocks, i, j; if (num_blocks = XmGetSecondaryResourceData (xmTextWidgetClass, &block_array)) { for (i = 0; i < num_blocks; i++) { for (j = 0; j < block_array[i]->num_resources; j++) { printf("%s ", block_array[i]->resources[j].resource_name); } XtFree((char*)block_array[i]->resources); XtFree((char*)block_array[i]); } XtFree((char*)block_array); } XmGetSecondaryResourceData(library call)
All times are GMT -4. The time now is 05:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy