The compiler (actually the linker) is telling you that it can't find the
char *pcCityIdToCountryName(ADMIN_DB_DATA *pstHEader, unit uiCityID)
code anywhere. Is this function in another module? If so you will have to link against that module.
The -L syntax requires you to remove the "lib" from in front of the shared library name:
The .so or .sl is not needed.
Hello all
im trying to build function that will return void function pointer
what is mean is ( not working )
the main function
void * myClass::getFunction(int type){
if(type==1)
return &myClass::Test1;
if(type==2)
return &myClass::Test2;
}
void myClass::Test1(){... (1 Reply)
If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it:
(1) one is to pass a pointer-to-pointer parameter, like:
int my_malloc(int size, char **pmem)
{
*pmem=(char *)malloc(size);
if(*pmem==NULL)... (11 Replies)
Hi.
Problem: I have to parse the payload of a packet. The payload could be in Big Endian Format (network byte order) or little. That depends on a flag present in the header of the packet.
Solution: A horrible solution could be to check for that flag everytime I have to read a field in the... (11 Replies)
if i create an array of pointers to a structure "struct node" as:
struct node *r;
and create "n" number of "linked lists" and assign it to the various struct pointers r using some function with a return type as structure pointer as:
r=multiplty(.......) /*some parameters*/
is... (2 Replies)
Hi,
In the below C code,
#include <stdio.h>
void print() {
printf("Hello\n");
}
int main() {
void (*f)() = (void (*)()) print;
f();
(*f)();
}
I wonder, how the syntaxes "f()" and "(*f)()" are treated as same without any error? Is this an improvement or ANSI/ISO... (1 Reply)
Does anyone know?
int x = 1;
int *p = &++x; //ok !
int *q = &x++; //gives an error :O
why the first pointer is ok but the second is an error? (13 Replies)
Have difficulty to understand this pure C code to only print vowels twice from input string. Questions are commented at the end of each place.
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
/*
*Demonstrate the use of dispatch tables
*/
/*Print a char... (11 Replies)
I am passing a char* to the function "reverse" and when I execute it with gdb I get:
Program received signal SIGSEGV, Segmentation fault.
0x000000000040083b in reverse (s=0x400b2b "hello") at pointersExample.c:72
72 *q = *p;
Attached is the source code.
I do not understand why... (9 Replies)
Discussion started by: jose_spain
9 Replies
LEARN ABOUT DEBIAN
resource_int_value
RESOURCE_INT_VALUE(9) BSD Kernel Developer's Manual RESOURCE_INT_VALUE(9)NAME
resource_int_value, resource_long_value, resource_string_value -- get a value from the hints mechanism
SYNOPSIS
#include <sys/param.h>
#include <sys/bus.h>
int
resource_int_value(const char *name, int unit, const char *resname, int *result);
int
resource_long_value(const char *name, int unit, const char *resname, long *result);
int
resource_string_value(const char *name, int unit, const char *resname, const char **result);
DESCRIPTION
These functions fetch a value from the ``hints'' mechanism.
The functions take the following arguments:
name The name of the device to get the resource value from.
unit The unit number of the device. -1 is special and is used for wildcard entries.
resname The resource name.
result A pointer to memory in which to store the resource value.
RETURN VALUES
If successful, the functions return 0. Otherwise, a non-zero error code is returned.
ERRORS
The functions will fail if:
[ENOENT] The resource could not be found.
[EFTYPE] Inappropriate resource type.
SEE ALSO device(9), driver(9)AUTHORS
This manual page was written by Warner Losh <imp@FreeBSD.org>.
BSD March 1, 2001 BSD