i have a function:
char *pcCityIdToCountryName(ADMIN_DB_DATA *pstHEader, unit uiCityID)
this returns a pointer to CountryName if cityId is given.
to retrieve countryname i give:
char *CountryName;
CountryName = pcCityIdToCountryName(..................);
but when i compile it is giving :... (5 Replies)
void main()
{
int a={1,2,3,4,5,6,7,8,9,10};
int *p=a;
int *q=&a;
cout<<q-p+1<<endl;
}
The output is 10, how?
if we give cout<<q it will print the address, value won't print....
if we give cout<<p it will print the address, value won't print....
p has the base addr; q... (1 Reply)
can u tell me the reson that why we should not delete a pointer twice.?
if we delete ponter twice then what happen and why this happen
Regards,
Amit (2 Replies)
i am having a string like
" X1 " ---> string lenght is 30
I have stored this to a chararry . ref
so here ref = " X1 "
now i trim the left space by my function . Si the string now becomes
"X1 " ---> string lenght is 15... (3 Replies)
Hi,
I am trying to divide my input to different type of out puts for some other use.
ex: logical_name : jkl00001
expected out put : model=jkl and num=00001
here is the code i actually written
/*******************************************************************/
void... (11 Replies)
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)
I am trying to test some operations on a directed list. However, the declaration of a pointer is giving me trouble.
I seem to have done something incorrectly because I get an error:
"listtest.c:29: warning: 'p' may be used uninitialized in this function"
Can anyone help?
This is my code... (6 Replies)
I have a problem with scanf() for string pointer as member of a struct.
#include <stdio.h>
#include <stdlib.h>
struct Student {
int studentNumber;
int phoneNumber;
char *studentName; //line 7
// char studentName; //line 8
};
int... (10 Replies)
Discussion started by: yifangt
10 Replies
LEARN ABOUT FREEBSD
hx509_clear_error_string
hx509 error functions(3) Heimdalx509library hx509 error functions(3)NAME
hx509 error functions -
Functions
void hx509_clear_error_string (hx509_context context)
void hx509_set_error_stringv (hx509_context context, int flags, int code, const char *fmt, va_list ap)
void hx509_set_error_string (hx509_context context, int flags, int code, const char *fmt,...)
char * hx509_get_error_string (hx509_context context, int error_code)
void hx509_free_error_string (char *str)
void hx509_err (hx509_context context, int exit_code, int error_code, const char *fmt,...)
Detailed Description
See the Hx509 error reporting functions for description and examples.
Function Documentation
void hx509_clear_error_string (hx509_context context)
Resets the error strings the hx509 context.
Parameters:
context A hx509 context.
void hx509_err (hx509_context context, int exit_code, int error_code, const char * fmt, ...)
Print error message and fatally exit from error code
Parameters:
context A hx509 context.
exit_code exit() code from process.
error_code Error code for the reason to exit.
fmt format string with the exit message.
... argument to format string.
void hx509_free_error_string (char * str)
Free error string returned by hx509_get_error_string().
Parameters:
str error string to free.
char* hx509_get_error_string (hx509_context context, int error_code)
Get an error string from context associated with error_code.
Parameters:
context A hx509 context.
error_code Get error message for this error code.
Returns:
error string, free with hx509_free_error_string().
void hx509_set_error_string (hx509_context context, int flags, int code, const char * fmt, ...)
See hx509_set_error_stringv().
Parameters:
context A hx509 context.
flags
o HX509_ERROR_APPEND appends the error string to the old messages (code is updated).
code error code related to error message
fmt error message format
... arguments to error message format
void hx509_set_error_stringv (hx509_context context, int flags, int code, const char * fmt, va_list ap)
Add an error message to the hx509 context.
Parameters:
context A hx509 context.
flags
o HX509_ERROR_APPEND appends the error string to the old messages (code is updated).
code error code related to error message
fmt error message format
ap arguments to error message format
Version 1.5.2 11 Jan 2012 hx509 error functions(3)