Questions tagged [readfile]

ReadFile() is a Windows API function to read data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device.

2383 questions
0
votes
0 answers

c++ ifstream not reading integers

My ifstream is not reading integers correctly. My main is as follows: #include #include #include int main() { vector myvec; Tree myAVL; ifstream myfile; string filename; cout << "Enter the…
0
votes
1 answer

File not found exception but it is in the same folder/package

I have a problem. In my program in one package there are a class Firma. At the constructor of this class I read some information out of a text file named 'firmendaten.fd'. The textfile is also located at the same package, but if I try to read i get…
0
votes
2 answers

Read lines between two markers

How can I read a text file one section at a time between two markers. for example; **** code:2010 code:2011 code:2013 **** and have it print out one line at a time: *code:2010 code:2011 code:2013* I'm using Python3.…
0
votes
0 answers

save thee value of a variable and store it as an int

i have a problem with my code. void readSis(string sisName) { ifstream infile(sisName.c_str()); Data platform; // todo: split tiap = platform.N = atof(readInputLine(infile).c_str()); platform.Ti =…
Refan
  • 1
0
votes
1 answer

read javascript file with PHP

please help me I would like to read a javascript file and retrieve only lines starting with url.instance = "www.google.fr"; in input in order to be able to modify these url $handle = fopen('javascriptfile.js', 'r'); if ($handle) { while…
etudiant
  • 35
  • 1
  • 7
0
votes
0 answers

Use a file as the input for bash script?

I currently have a simple bash script that work fine when I use user input, however I would like to use a file as the input instead. This is the code I have right now #!/bin/bash go=0 while [ $go ]; do echo -e "Enter one of the following actions…
below_avg_st
  • 187
  • 15
0
votes
0 answers

Readfile of serial GPS in VS2010 produces additional values

I am writing a program to capture serial data from an old GPS unit (Garmin Etrex Venture) connected to a PC. After sending a 'send time' packet to the unit, I use a readfile from the COM3 port (hCom). int read_packet() //READS PACKET FROM DEVICE…
user19425
  • 11
  • 3
0
votes
1 answer

JAVA: Storing contents from txt file to 3D arrays

I wish to store the contents in text file in an array. Here are the data of the txt file: 0.8585781857237149 0.27817454182457335 -0.8050499953993335 0.6370714882668496 0.2972334455862271 -0.03239256370254662 -0.27150466294617615 …
gonzalloe
  • 313
  • 3
  • 7
  • 22
0
votes
1 answer

How to store numbers of a file in a array of integers

I need to read a file with numbers and then store this numbers in a array, after that I need to remove the repeated numbers presenting in the array and subscribe the file. The problem is I can't even put the numbers on the file in a array of…
Rafael Camara
  • 33
  • 1
  • 6
0
votes
1 answer

Read non standard database in Python

I'm trying to convert a .txt file to a csv file using Python. This txt is not conventionnal (at least I have never seen something like that, it's basically like that: key a: foo key b: bar $$$ $$$ key a: foo1 key b: bar1 $$$ $$$ key a: foo2 key b:…
LeGravier
  • 33
  • 5
0
votes
1 answer

How can Java Web read new changes on attributes automatically?

I just have created a Java Filter that, if one of its properties has a true value, the filter will redirect all the requests to a maintenance JSP (the server is not operational). If that property has a false value, the filter will redirect to the…
Ommadawn
  • 2,450
  • 3
  • 24
  • 48
0
votes
2 answers

Reading a multiple type line from a text file, and storing them separately?

I have a question regarding this type of problem. There is a .txt file containing an unknown number of lines in a format like this: Cityname(max 30 char)temperature(float)wind_speed(float)air_pressure(float). Example of a line in a…
CptWhoWent
  • 33
  • 1
  • 4
0
votes
2 answers

c# store textbox(file content) lines into array

Hey I am currently stuck. I have the following code that takes a line from a file, based on specific string and returns it, then it can be edited, and applied back to a textbox that contains the file content into the line that the string was…
Dr4ken
  • 27
  • 1
  • 11
0
votes
0 answers

Cannot play video on IE and Firefox with PHP header and readfile/fopen

I'm using a code that gets a file from the server (protected file) and download or view it on the user. I've got a problem on making Firefox and IE play HTML5 video from that URL. This code is only working of Chrome. I know its a little messy but…
IkNothing
  • 1
  • 1
0
votes
1 answer

How to either read from one file or another in bash?

I have two files I am trying to read line by line, but I only want to continue reading from only file or the other on any given iteration of a loop. (I am also unsure how to check for EOF). Here is my pseudocode: #initialize variables line1=read…
WarBro
  • 305
  • 2
  • 10