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)
I'm pretty new at this UNIX stuff, and this may be a simple question but I'm kind of stuck :confused:
Let's say I have a large directory structure of .essay files,
where I saved all of the essays that I did over the last few years. Not all of the .essay files are in the same directory (all... (1 Reply)
Hi
i have the following structure
struct S
{
char Mod_num;
char val;
char chr_nm_cd;
}
I am reading a 2GB file and inserting into the structure and writing into a vector.
I feel like only vector will be a right option. I tried with multimap but it is memory intensive and hence i... (1 Reply)
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)
I was given to create a backup of all files in a given directory(command line argument) into say /home/vishal/back and the back up files must be accordingly to the extension of the file i.e pdf files are saved in back/pdf doc files back/doc etc . I gave a recursive function to traverse through the... (1 Reply)
I am writing a script which will read a word and say how many vowels and consonants does the word contain. but i dont know how to traverse a string in shell scripting. if it was in C i'd have done something like this:
cout<<"plz enter the word"<<endl;
cin>>word;
int consonants, vowels;... (4 Replies)
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)
Hello,
I want to loop thru a vector composed of many entries as structure, which contains sequenceID and sequence. At looping, delete any structure if the sequence is a perfect-match substring of another sequence of any other structure, so that the resulted vector contains only unique sequences.... (1 Reply)
I am attempting to create an array of function pointers. The examples I follow to do this are from:
support.microsoft.com/en-us/help/30580/how-to-declare-an-array-of-pointers-to-functions-in-visual-c
... (3 Replies)
Discussion started by: spflanze
3 Replies
LEARN ABOUT DEBIAN
hook_config_section
hook_config_section(3alleg4) Allegro manual hook_config_section(3alleg4)NAME
hook_config_section - Hooks a configuration file section with custom handlers. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
void hook_config_section(const char *section, int (*intgetter)(const char *name, int def), const char *(*stringgetter)(const char *name,
const char *def), void (*stringsetter)(const char *name, const char *value));
DESCRIPTION
Takes control of the specified config file section, so that your hook functions will be used to manipulate it instead of the normal disk
file access. If both the getter and setter functions are NULL, a currently present hook will be unhooked. Hooked functions have the highest
priority. If a section is hooked, the hook will always be called, so you can also hook a '#' section: even override_config_file() cannot
override a hooked section. Example:
int decode_encrypted_int(const char *name, int def)
{
...
}
const char *decode_encrypted_string(const char *name, const char *def)
{
...
}
void encode_plaintext_string(const char *name, const char *value)
{
...
}
int main(int argc, char *argv[])
{
...
/* Make it harder for users to tinker with the high scores. */
hook_config_section("high_scores", decode_encrypted_int,
decode_encrypted_string, encode_plaintext_string);
...
} END_OF_MAIN()
SEE ALSO config_is_hooked(3alleg4)Allegro version 4.4.2 hook_config_section(3alleg4)