This is the test text file:
this is a test
this is only a test
this is also a test
I just want to allocate memory and store each character in an array on the allocated memory
Type: Posts; User: johngoodman
This is the test text file:
this is a test
this is only a test
this is also a test
I just want to allocate memory and store each character in an array on the allocated memory
Here's another thought I had :
int i = 0;
char* stackArray[100];
//char* ar = (char*)malloc(*count)*sizeof(char));
do {
scanf("%s", &stackArray[i]);
...
I have a text file with spaces and new lines, how do i read it into a character array such that to maintain the formatting?
int main(){
char* ar = readScores();
}
char* readScores() {