21 Topics

Member Avatar for
Member Avatar for Venku Tur'Mukan

I've recently become interested in trying to adapt my Rock-Paper-Scissors game into a multiplayer-friendly program, so today I decided I'd look up a tutorial on servers. It seems I'm following it precisely (aside from using a different IDE). However, something is going wrong and I'm not sure exactly what it …

0
195
Member Avatar for ABSOR

I have a text file that I open and attempt to read the individual lines. I have used the same code before on other files with no problem, but for some reason, this particular file is strange. When I do the following command; Line Input #1, read_string the string read_string …

0
149
Member Avatar for stealthless

Hello, I'm a starter in Python and I need help. I'm trying to ask the user to input as much text as he/she likes until he/she types EOF (end of file) on a separate line. Once he/she does, the program should end. I started on my code and below is …

Member Avatar for slate
0
541
Member Avatar for Labdabeta

Hello. I am wondering how EOFs are indicated to either the cstdio functions or the fstream functions. Mainly I am wondering how it differentiates it from data. For example, if EOF is a 2-byte code wouldn't this break the system by inserting a 'false' eof flag: for (int i=0; i<256; …

Member Avatar for Labdabeta
0
177
Member Avatar for borchu

Hello everyone, I have problem with my simple android chat program when using different test debugging. I have two android emulators one reads SERVERPORT as 8080 and CLIENTPORT as 8082 and the other android emulator reads SERVERPORT as 8082 and CLIENTPORT as 8080 from a given txt file. Here there …

Member Avatar for borchu
0
2K
Member Avatar for Graphix

Hi everyone, I'm currently working on a cross-platform project to copy data from the computer onto a USB drive quickly. [B]Main problem: EOF in the middle of the file[/B] It's going good so far, but I stumbled across a problem in my copy_file function: [CODE]int copy_file(char *source_path, char *destination_path) { …

Member Avatar for Graphix
0
2K
Member Avatar for TMDG

I am wondering how to read a file in c... this requires some more background information before you give me something useless What I have so far: [CODE]#include <stdio.h> int main(void) { FILE *fpr,*fpw; char C; int I; fpr = fopen("cwM.dat","r"); fpw = fopen("echocwM.dat","w"); while (C != EOF) { fscanf(fpr,"%c",&C); …

Member Avatar for WaltP
0
262
Member Avatar for bennetk2

I am unable to figure out how to check to see if there is more data in the file. I have a input file, where the last two lines are just new lines with new data. When I run my code, I get the last line of data in the …

Member Avatar for WaltP
0
180
Member Avatar for phoenix_2000

Heya people, Here's my problem: i have a (for me quite lengthy) piece of SQL code which is automagically generated by my own application. However, when i try to execute it, it gives me an recordSet error ("Either BOF of EOF is true, or the current record has been deleted"). …

Member Avatar for phoenix_2000
0
229
Member Avatar for neveragn

how do you promt the program from positive integars terminatd by -1 .. and then ask for smallest of these integars. I did everything except when I add (!= EOF) .. It shows the same prompt multiple times should I still keep the code or is there a specific error? …

Member Avatar for neveragn
0
254
Member Avatar for pradeep_java

If EOF (End of File)flag in Java like there is in .NET. If yes in which class is it present. The problem I am facing is that i cannot edit the input file and the values are present in very alternate line. Therefore I cannot ensure whether the entire file …

Member Avatar for pradeep_java
0
568
Member Avatar for Vinod Supnekar

Hey hi , i want to read input frm user fm command prompt(Cmd)!!And aslo print it on Cmd. Now if i use [CODE] #include <stdio.h> main() { int c; while ((c=getchar()!=EOF)//get the sinle char putchar(c);//prnt it on cmd } [/CODE] But i dnt knw how to enter EOF as i …

Member Avatar for Ancient Dragon
0
416
Member Avatar for RaigaX9

Hello, I'm having another problem with assembly. I'm writing a Fibonacci sequence in assembly and I think I got all my stuff set up, but after I try to convert from .m to .s using gm4, I'm getting this here: NONE:0: gm4: ERROR: EOF in argument list Can anyone tell …

0
111
Member Avatar for kxpatel29

Requirement 1) Modify the code to find and print sum of the same series from 1/2 through 1/n multiple times, where each n is read from data file. Requires nested loop with the inner loop summing up series and outer loop allow inner code to repeat once for each n …

Member Avatar for kxpatel29
0
176
Member Avatar for ERadu

Hello! I am having some trouble with reading data for a list. If at the end of the file there is a new line character, this function reads the last set of data again, and then exits the loop. The addElem function works fine, I tested it separately. As there …

Member Avatar for arkoenig
0
288
Member Avatar for codingNewB

Hello Everybody I cannot get my file to open in my eof program. Outlined below is what the program needs to do: 1) Program needs to read from a file (ex. "Data.txt") 2) Program needs to read even & odd numbers down file. (ex. 2 3 12 5) 3) Program …

Member Avatar for codingNewB
0
754
Member Avatar for lionaneesh

I am trying to solve the problem Present at [url]http://www.codechef.com/problems/INTEST/[/url] I have made a small Python script to do my job :- [CODE]array = [] no_lines = 0 no = 0 j=0 div_no=0 no_lines = input() no = input() temp = no_lines while(no_lines>0) : i=0 i = input() array[j] = …

Member Avatar for TrustyTony
0
782
Member Avatar for vanalex

Hello everybody! I need to move the get pointer of a text file at the beginning so i wrote in my program the following line (knowing that in a binary file really works): [code=c]ifstream in; in.open("data.txt", ios::in); in.seekg(0, ios_base::beg); [/code] but...in my text file doesn't really work. Is there a …

Member Avatar for vanalex
0
220
Member Avatar for rickymak

int c; c = getchar(); while ((c = getchar()) != EOF) putchar(c); c = getchar(); I know EOF means end of file. Basically, I believe this functions is instructed to keep inputing text from the keyboard until EOF becomes the subsequent input. However, I am not sure what EOF is …

Member Avatar for Aia
0
190
Member Avatar for ziyakhan10

the program runs successfully but the final output comes out in the form of an infinite loop...please help [CODE] #include<iostream.h> #include<fstream.h> #include<conio.h> #include<stdio.h> struct emp { int eno; char name[20],desig[20]; float sal; }e; void main() { clrscr(); ofstream f1; f1.open("emp.dat",ios::app|ios::binary); char ch='y'; while(f1) { if(ch=='y'||ch=='Y') { cout<<"Enter the name"<<endl; gets(e.desig); …

Member Avatar for ziyakhan10
0
187
Member Avatar for techie1991

Hello, I was trying to implement data structures using file operations. I am using a data structure of two integers, one being the index number and other being the value. My actual aim is to recreate the file containing the data using a log. But, the program isn't running as …

Member Avatar for WaltP
0
453

The End.