It can also be done in this manner.
#include <stdio.h>
void read_matrix(double *matrix, int rows, int cols);
void print_matrix(double *matrix, int rows, int cols);
int main(void)
{
...
Type: Posts; User: SashaN
It can also be done in this manner.
#include <stdio.h>
void read_matrix(double *matrix, int rows, int cols);
void print_matrix(double *matrix, int rows, int cols);
int main(void)
{
...
I have not known that, but now. Thank you.
AndiPersti thank you for interesting links.
Do you have same example? For I don't understand how it works.
That the point I do not understand. It receives a source string and returns tokens terminated by '\0'.
But it doesn't alter the...
Thank you for your help.
strtok() works now as I will, although the program is not ready yet.
Here the code.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void get_string(char...
What is wrong in my code?
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
char *pos1, *pos2;
char string[256];
I have to find out, whether some word is contained more than one time in the string.
Hallo!
How can I reset strtoc()?
After I have caled it twice "strtok(string, " ") ",
it works not fine "strtok(NULL, " ")".
Is there a solution?
#include <stdio.h>
#include <string.h>...
Thank you for quick answers.
To breimer273: I have to see how valgrind works.
To std10093: I had doubts, whether free() correct works if I allocate the memory in a separate block (in a function).
Hallo I have a question.
Is that valid, or have I then a memory lack?
char *getArray(int n)
{
char *ptr = malloc(n);
return ptr;
}