Jump to content

Como funciona o comando fopen?


Recommended Posts

Após várias tentativas... estou completamente perdido.


tenho um file chamado: test.txt com as seguintes linhas



char line[1024];
	FILE *fp = fopen("test.txt", "r");

	//Checks if file is empty
	if (fp == NULL) {
	while (fgets(line, 1024, fp)) {
		if (GetRace() == printf("%s\n", line))  <<<<<<< Como posso fazer, para encontrar todas as linhas do test.txt e fazer o comando


Edited by Braunwald
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...