Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: powerb23
  • Content: Threads
  • Order by date
  1. powerb23

    string and integer concatenation

    How would i concatenate strings and integers. For example char* m = "there are "; char* n = " days" int x = 3; i would like something like char* ans = "there are 3 days" Your help will be appreciated
  2. powerb23

    linkage error

    Hi, I was wondering what causes this error: 'isPrime' was declared implicitly 'extern' and later static if i had my declarations as static int isPrime(int n){ ... } int doSomething(int m){ ... if (!isPrime(5)) /* do something */ } Your help will be appreciated
  3. powerb23

    Macro definition

    Hi, I would like to define a macro that returns 0 if it cannot open the file and returns 1 if it opens the file. For example; #define OPEN(fileHandle) (fileHandle = fopen("blah.dat", "r")) I would like to use conditional logic but not sure of how to go around it. In this...
  4. powerb23

    fscanf(....) question.

    Hi, I would like to write an fscanf statement to read the first integer value at the start of the line.This is what i was using: int c = 0; int sr = fscanf(inFile, "%d", &c); I was puzzled as to why this returned a value of 1 when the line contained: 8as 12 Your help will be...
  5. powerb23

    pointer to an array in a function

    Hi, I wanted to find out how i would point to the array arr in function get(char *p) so that i ould print the contents of this array. Your help will be appreciated. int main(){ char * ptr = NULL: get(ptr); printf("contents: %s:, ptr); } void get(char *p){ char [5]mm = NULL...

Part and Inventory Search

Back
Top