[Dev-C++] how do you pass strings in pointers?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Calvin M. <cm...@pg...> - 2001-01-15 05:32:04
|
I am trying to pass a adjusted string pointer back to original function and
I am not able to read it, I am able to send it ok, and I can manipulate it
fine !!! the problem is when I try to work with it after it has been
changed(back in the original function) it looks as if their is nothing
their?
the code is below
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void token(char *,char *,char *);
int main()
{
char s_phone[18],*area,*number;
double dnumber;
int darea;
token(s_phone,area,number);
//puts(area);
//dnumber = atol(number); // converts string to long
//darea = atoi(area); // converts string to int
return 0;
}
/****************************************************************
* Function to token out the parts of the phone number **
***************************************************************/
void token(char *phoneptr,char *areaptr,char *numberptr)
{
}
|