#include <cstdio>
#include <windows.h>
int WriteAllButOne(char* string, int line)
{
FILE * tempfile;
tempfile = fopen("output.txt","wb");
if (tempfile == NULL) {
return 0;
...
Type: Posts; User: Tommy7
#include <cstdio>
#include <windows.h>
int WriteAllButOne(char* string, int line)
{
FILE * tempfile;
tempfile = fopen("output.txt","wb");
if (tempfile == NULL) {
return 0;
...
Um, sorry if I wasn't clear, but the whole point of that function is to write all of the lines in a text file except for one specified line. I didn't add a hard limit for the number of lines that I'm...
Test.txt:
This is a test file
that I made
so that I could test
stuff
right?
0
0
0
#include <cstdio>
#include <windows.h>
int WriteAllButOne(char* string, int line)
{
FILE * tempfile;
tempfile = fopen("output.txt","wb");
if (fopen == NULL) { return 0; }
int x = 0;
int i =...
Much appreciated!
Hello, I am new to C++, I just started yesterday. I am trying to make a fuction where I can return a line from a .txt with linesi(file.txt,line number).
But I get the following errors, and being...