10-05-2005
I'm not sure what you mean. Are you asking about variable declarations, like "const char c" vs "char const c", or character constants like 'L' ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I want to compare two files. All records in file 2 that are not in file 1 should be output to file 3.
For example:
file 1
123
1234
123456
file 2
123
2345
23456
file 3 should have
2345
23456
I have looked at diff, bdiff, cmp, comm, diff3 without any luck! (2 Replies)
Discussion started by: blt123
2 Replies
2. Programming
Can any one explain how the statement '2' in the following statements is a legal one.
int & ref = 3; // Illegal statement - Compiler error.
const int& ref=3 ; // Compile and executes properly.
Thanks in Advance,
Arun (1 Reply)
Discussion started by: arun.viswanath
1 Replies
3. UNIX for Dummies Questions & Answers
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. Programming
hello everybody!
i have aproblem! i dont know how to concatenate const char* with char
const char *buffer;
char *b;
sprintf(b,"result.txt");
strcat(buffer,b);
thanx in advance (4 Replies)
Discussion started by: nicos
4 Replies
5. Programming
Hi all,
I have some questions about functions.
In a code I have (a .hpp file) there is this line which says:
const Class_1_Name* Class_2_Name::MethodName(int ipart) const {return (ClassName*)_ref_to_method.At(ipart);}
My questions are:
What is the meaning of the two constants,... (2 Replies)
Discussion started by: eager2no
2 Replies
6. Shell Programming and Scripting
Moderator, please, delete this topic (1 Reply)
Discussion started by: optik77
1 Replies
7. Programming
Compiling xpp (The X Printing Panel) on SL6 (RHEL6 essentially):
xpp.cxx: In constructor ‘printFiles::printFiles(int, char**, int&)’:
xpp.cxx:200: error: invalid conversion from ‘const char*’ to ‘char*’
The same error with all c++ constructors - gcc 4.4.4.
If anyone can throw any light on... (8 Replies)
Discussion started by: GSO
8 Replies
8. Shell Programming and Scripting
Hi,
I am new to shell scripting.
please help me to find out the solution.
I need a script where we need to read the text file(consists of all file names) and get the file names one by one
and append the date suffix for each file name as 'yyyymmdd' .
Then search each file if exists... (1 Reply)
Discussion started by: Lucky123
1 Replies
9. Programming
I am writing some code in C++ to print a message using fprintf
Here is an example
void pr_desc(
FILE* stream,
int shift,
const char* desc) {
const char* format="%*s\e;
fprintf(stream,format,shift,"",desc);
}
I call it using
const char* desc;
... (4 Replies)
Discussion started by: kristinu
4 Replies
10. Programming
Dear all,
I am using C and ROOT for programming. And I need to incorporate following in my code.
char *fps=NULL;
int dec=0,sign=0;
float mean = h1->GetMean(1); //0.001298
fps= fcvt(mean,6 , &dec, &sign);
I need to provide this mean as const char to some other function to get... (8 Replies)
Discussion started by: emily
8 Replies
LEARN ABOUT FREEBSD
string
STRING(3) BSD Library Functions Manual STRING(3)
NAME
stpcpy, strcat, strncat, strchr, strrchr, strcmp, strncmp, strcasecmp, strncasecmp, strcpy, strncpy, strerror, strlen, strpbrk, strsep,
strspn, strcspn, strstr, strtok, index, rindex -- string specific functions
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <string.h>
char *
stpcpy(char *dst, const char *src);
char *
strcat(char *s, const char * append);
char *
strncat(char *s, const char *append, size_t count);
char *
strchr(const char *s, int c);
char *
strrchr(const char *s, int c);
int
strcmp(const char *s1, const char *s2);
int
strncmp(const char *s1, const char *s2, size_t count);
int
strcasecmp(const char *s1, const char *s2);
int
strncasecmp(const char *s1, const char *s2, size_t count);
char *
strcpy(char *dst, const char *src);
char *
strncpy(char *dst, const char *src, size_t count);
char *
strerror(int errno);
size_t
strlen(const char *s);
char *
strpbrk(const char *s, const char *charset);
char *
strsep(char **stringp, const char *delim);
size_t
strspn(const char *s, const char *charset);
size_t
strcspn(const char *s, const char *charset);
char *
strstr(const char *big, const char *little);
char *
strtok(char *s, const char *delim);
char *
index(const char *s, int c);
char *
rindex(const char *s, int c);
DESCRIPTION
The string functions manipulate strings terminated by a null byte.
See the specific manual pages for more information. For manipulating variable length generic objects as byte strings (without the null byte
check), see bstring(3).
Except as noted in their specific manual pages, the string functions do not test the destination for size limitations.
SEE ALSO
bstring(3), index(3), rindex(3), stpcpy(3), strcasecmp(3), strcat(3), strchr(3), strcmp(3), strcpy(3), strcspn(3), strerror(3), strlen(3),
strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), strtok(3)
STANDARDS
The strcat(), strncat(), strchr(), strrchr(), strcmp(), strncmp(), strcpy(), strncpy(), strerror(), strlen(), strpbrk(), strspn(), strcspn(),
strstr(), and strtok() functions conform to ISO/IEC 9899:1990 (``ISO C90'').
BSD
December 11, 1993 BSD