SERIOUSLY: AFTER you see the 13 outputted on the screen, do you type 13 and then press enter??! cuz if you don't, THAT'S the problem--you should!!! lol
the problem is simple, and it doesn't...
Type: Posts; User: greenstock
SERIOUSLY: AFTER you see the 13 outputted on the screen, do you type 13 and then press enter??! cuz if you don't, THAT'S the problem--you should!!! lol
the problem is simple, and it doesn't...
hmm i knew it went something like this :)
#include <time.h>
#include<stdio.h>
int main(void){
long start,end;
start=clock();
do
end=clock();
>>I know it involves nested for loops with increasing x and y values for a char[x][y] sort of set up, but I'm not sure how to get x and y there to point at proper points in the loaded file.
call...
not to mention the liquid cristals off your spanking new 17'' screen
p.s. : it's not a function, just a command...or more like a secret kabbalistic incantation.
hmm <fstream.h> works fine on our school compilers and it has the "cout/cin" commands included :) so i don't have to include <iostream.h>. honestly i've never used <fstream> with the std thing before...
haha i've done it! i've finished the whole stupid problem...and on such short notice too (sarcastic)
ok the problem asked me to see wether the binary number from "nrbinar.in" was odd or not, and if...
haha yeah i only delete half +1 of the list ...sorry didn't really compile that *ahem* anyways who wants to delete a whole list anyway !?!?? you can delete the first element and never hear from that...
thanks Daved. I was thinking about using another variable to see how <i>many</i> ones there were in the file but the mistake i kept doing was that i wanted to use that variable in the while :D which...
hmm the simplest way to destroy a whole list is to write a function that eliminates one element the list and use that in another function which has a while or for ...
something like
#include...
ok. i promissed so here is my code for this :D
#include <fstream.h>
#include<conio.h>
unsigned long int nr=0;
char a;
void main(){
fstream f("nrbinar.in", ios::in);
i knwo it wouldn't ... i've done it differently ...i'll give the code after i finish some stuff ..the actual problem i was workin on wanted a bit more than counting the ending zeros...that's just a...
#include <fstream.h>
#include<conio.h>
unsigned long int nr,n;
char a[1000000];
void main(){
fstream f("nrbinar.in", ios::in);
f>>n;
for(int i=0;i<n;i++){
if(a[i]=='0')...
i don't know how to do this without using an array in which i've already copied the information from the text file :D ..i mean, to me handling arrays is a very easy thing :D but i get confused with...
that's exactly (well almost exactly) what i asked two posts below yours!!!! grrr
ok i know this might sound wierd, but the problem comes down to knowing how to do this ...and i just don't see how i could do it. maybe there's someone out there who can enlighten me :D
ok the...