oh well i got the part for reading the number of lines... I just modified the small code I typed...however i couldnt display it properly on the output file...but I just thought it was enough bugging...
Type: Posts; User: jujubeats
oh well i got the part for reading the number of lines... I just modified the small code I typed...however i couldnt display it properly on the output file...but I just thought it was enough bugging...
i got it ...thanx =)
this is the part i was trying to implement unsuccesfully:
string t;
int lineCount=0;
while(getline(file_op, t, '\n'))
++lineCount;
I apologize heres what my code looks like
#include "stdafx.h"
#include <fstream>
#include <iostream>
using namespace std;
int main()
thanx
im trying to but i think im using it as to read from the keyboard instead of my file thats why its not working
its just a series of matrices
instead of cat and dog
its more like
000
010
100
111
well sticking to words instead of binary inputs
lets say I have
dogs
cats
plane
fish
i already opened the file I just need to put a subroutine to count
oh no scanf is the same as cin
the file only contains binary inputs
so scanf would be also a good resource?
i was on the correct path using the getline but i havent been able so far let me keep on trying
thanx
Is there a simple code or function I can implement into my code to read the number of lines in a given file?
thanx
jujubeats
thanx dave..you didnt have to take the time and work on my program....
i greatly appreciate it
I owe you lunch
juju
well it gave me 4 adresses in matrix order but ill keep on moving it around to see if it works
yes it actually holds for the simplified version...it should hold for the "more complex matrix" i initially though i had to mess with main or do something like:
void main(int n,int i,int j);
thanx let me try that
juju
I over simplified the array by giving it a simpe 1,2,3,4 input and it still gives me
a similar address like output...
juju
so it would be something like:
.
.
.
.
Im working on a program that will esentially open a file read it and output the info on a new file. The contents of the file is simply an array...so i start by declaring the array however when i want...