4,718 Topics

Member Avatar for
Member Avatar for kryptolite

hi guys, i wonder how you can can take a string from a particular file and assign that to a variable. for example here is the file named 'isbn.txt' 123-456-789-0 87-345-21-347 09-876-543-21 and my code, as far is i can write it: [CODE] int fromfile() { string filename; ifstream fin; …

Member Avatar for kryptolite
0
137
Member Avatar for sixtysecasasin

I am using VC++. I want to display to the user all data that is stored in an input file and an output file. My input file contains the following so far but will continue to grow as the user uses it: 100.00 123.45 234.56 212.45 Here is what my …

Member Avatar for Ancient Dragon
0
149
Member Avatar for sark4_rahul

guys, I have a big problem. I want someone here to just read the charecters from the attachment to another file using c. The file is AES encrypted.Forget the encryption.Just read those encrypted chars and write to another file. thanks.

Member Avatar for Narue
0
98
Member Avatar for katharnakh

how to get the file dialog window and save dialog window in python. for example if select the File menu we can see Open menu option, when we click on that we get file open dialog window similarly when we click save as.... /save option we can see file save …

Member Avatar for bumsfeld
0
2K
Member Avatar for arvinp

Hey guys, I'm trying to write a code that reads in a .dat file from the SSH shell command line. example: java Prog1 xxxx so from the shell command line i want it to run Prog1 then read in the contents of the xxxx file All the code I look …

0
75
Member Avatar for server_crash

I have a program that reads from a file, but for some reason it never reaches the end of the file or something, because the loop never ends. I put only 2 lines of text in the file, and a loop like this still ran infinite: [code] while (! my_file.eof()) …

Member Avatar for Member #46692
0
5K
Member Avatar for Bellinis

I'm trying to find out what the direct link to the following flash file is (the map): [url]http://www.happyhome.nl/Map.aspx?Country=cz[/url] I'm unable to find it :( Anyone? ;-)

Member Avatar for plazmo
0
148
Member Avatar for rudeboy
Member Avatar for trinath

Hi all, I have a problem in handling files through C. here is the problem im having: i will query the database (for instance consider employees table ) for empno,ename,job,salary fields.The query returns me some 100 of rows. now i need to place them in a file in row wise …

Member Avatar for jim mcnamara
0
136
Member Avatar for derekn

I have a folder that is selected under my profile to "Make folder private" and is not selected to share on the network. It has been inaccessible to programs and the like forever, which is how i want it. For example, a CGI program cannot access that directory. HOWEVER, I …

Member Avatar for derekn
0
78
Member Avatar for bops

Hi, I am trying to get the file size of a .exe file in C, I have tried using the GetFileSize(); function using the CreateFile(); function to get a handle for it, but the value returned is a DWORD and doesnt seem to work when i output it. I want …

Member Avatar for Ancient Dragon
0
585
Member Avatar for Jon182

Hey guys, I have the following code, but for some reason it does not work with bigger txt files is this because of the size of the array? And if so is there a simple way to solve the problem? Thanks in advance for any help. [code] char ch[1000]; int …

Member Avatar for Jon182
0
251
Member Avatar for Jon182

Hey guys, the following code is part of a program I am working on and as a newbie to c++ I have come across a problem. As you can see when the case is J the int J is increased by 1 but how do I go about doing this …

Member Avatar for perniciosus
0
127
Member Avatar for akki_freak

help me with this....here i m trying to write into a file(which i have already created n saved in C:\ drive) from stdinput i.e. keyboard and then reading from that file and displaying on stdoutput....but its isn't working... :rolleyes: :rolleyes: tell me why????????? by the way i m using GCC …

Member Avatar for WolfPack
0
89
Member Avatar for Acidburn

I know I've asked but I'm now faced with a different problem. The last implementation went wrong since the number of chars on a given line is u known. ie [quote] John 15 nmmo short brown hair look young Andrew 22 young long bloack wavey hair with blue eyes. etc... …

Member Avatar for Ancient Dragon
0
131
Member Avatar for Acidburn

Hey guys and gals. I'm struggling yet again to get my file input working. I have a text file containing: John 19 smith 15 03 1986 Billy 15 Nomate 19 07 1990 ... etc I'm needing to get a line in at a time but also store the variables in …

Member Avatar for Acidburn
0
155
Member Avatar for slobo7x

Hello all. I have a small homework problem to write, and I could use a little help, someone to guide me in the right direction. I need to write a program that asks the user to enter the filename, and then enter the string to search in that file. If …

Member Avatar for perniciosus
0
480
Member Avatar for olly

Tried installing my usb controller,but i keep getting the above file misssing,and will not proceed to install,also says (code 28) with the same message. :( Any help to find and install this file will be appreciated, :) if not on my system,and chance of a web link to the file …

Member Avatar for olly
0
354
Member Avatar for atrusmre

What is the best way to save to a file using a MFC Dialog based program? I need it to output mutipule data type (CString, int) to a file. I also need it to read the data from the file to update the controls (i.e. an options dialog). I've tried …

Member Avatar for Daishi
0
177
Member Avatar for cumadhu

Hi All, I am working on a web site project.<BR> And it has the following set up:<BR> web site name: [B]madhu[/B] and <BR> Local path: [B]C:\madhu\Folder1[/B](uses [B]web.config[/B] file which is in [B]Folder1[/B] only).<BR> But i have one file in [B]C:\madhu\FolderXYZ\FileABC.doc[/B].<BR> If i try to access the FileABC.doc(Try to open the …

Member Avatar for Paladine
0
701
Member Avatar for Sharon7

I have a folder with all my pictures form my digital camera. But there are certain picture folders that have created a file called "ZbThumbnail.info" I have no idea what it is and I can't find a program that will open it. Also, I can't rename the file or move …

Member Avatar for nanosani
0
67
Member Avatar for Ancient Dragon

This is a simple example of how to use recursion to get a list of all the directories (folders) and file names within them. It also illustrates simple use if std::list, std::vector, std::string, std::cin and std::cout. It was compiled and tested with both VC++ 6.0 and Dev-C++ compilers on XP …

Member Avatar for Dani
0
272
Member Avatar for danizzil14

Ok I was wondering if anyone could help me with how to make a python program interact with files. Copying, pasting, moving, things like that, opening. If it cant really be discussed quicky are there any good tutorials? Mainly a organinzing python program.(looks for a certain file extention, then moves …

Member Avatar for vegaseat
0
239
Member Avatar for plazmo

is there a way i can look at a file and see its type. i need to make a program that scans files and determins if the file extenstion is correct based on the actual file type. this, for example, would find a ".zip" file hidden with a ".jpg" extension …

Member Avatar for campkev
0
152
Member Avatar for bumsfeld

I want to creat file with each line having date + time + data so I can append more data as need be and know when it was added. What date+time function would be best?

Member Avatar for bumsfeld
0
171
Member Avatar for mahes_

I have a lab work on File input/output...I have to put in 12 names under the file name names.txt..and subdivide the names into small.txt(if the length of the name is below or equals to 5) and large.txt(if the length of the name is more then 5..)..I have done a source …

Member Avatar for mahes_
0
171
Member Avatar for ayk-retail

I am trying to access files on my XP comp with my computer that has 98, such as My Documents etc. For some reason it won't let me access it. I dont have a logon password on the XP comp nor do I have one on the 98. Thanks!!! Avrom …

Member Avatar for SimpleJohn
0
143
Member Avatar for christyj5

I am trying to infile my data file into two seperate arrays which are seperated by a white space in my file. But I keep getting -86******* something number where my file is suppose to be any help will be very helpful. My first array which will read the student …

Member Avatar for Lerner
0
522
Member Avatar for SpS

[code] #include <iostream> int main(int argc, char *argv[]) { int count=0; if (argc<2) { std::cout<<"Wrong No Of Parameters"; exit(1); } FILE *file; file=fopen(argv[1],"r"); char c; while((c=getc(file))!=EOF) { if (c=='\n') { count+=1; std::cout<<std::endl; } else printf("%c",c); } std::cout<<"\nNo Of Lines In the File :"<<count+1; fclose(file); return 0; } [/code] My program …

Member Avatar for Ancient Dragon
0
118
Member Avatar for xav.vijay

Hai friends I have a small problem with my code... I want to copy an existing file (its a model MS Excel file) to a new file & name it with the current date... First I tried to create the model Excel file, but when I opened it, it had …

Member Avatar for xav.vijay
0
346
Member Avatar for mforeman

Hello, I’m trying to increment numbers in a file – for instance, I would like to change the below 3 lines in a file by incrementing the numbers by 2 (or whatever the user gives). Mikef<20:40> JoeyS<23> Samt<14:39> So the end results should look like this: Mikef<22:42> JoeyS<25> Samt<16:41> I …

Member Avatar for mforeman
0
181
Member Avatar for compshooter

[FONT=Comic Sans MS]Hello evreryone, I want to start by saying I did use the search function and I did read the fstream tutorial. But I didn't see the answer I need. I have been given a text file for which I need to read input from. Here is a partial …

Member Avatar for bobobobo51
0
2K
Member Avatar for pre_wreck

dear guru's, I had a problem in C, and i seems i can't figure out why this piece of codes seems not working properly, kindly help my with my little problem? /* My problem here is, how can i copy the file into other file name, i just wanted to …

Member Avatar for pre_wreck
0
183
Member Avatar for vegaseat

[B]Python and the JPEG Image File, Part 1, The Header[/B] [B]Intro[/B] The JPEG image file format (.jpg) is very popular on the internet because you can pack a lot of picture information into a relatively small file. There are competing file formats like GIF and PNG. GIF is rather limited …

0
743
Member Avatar for jmist

Hello, This morning, I turned on my computer, only to have it stop booting before it got to the Windows logo. It then gave me the message: windows cannot start because the following file is mssing or corrupt <windows root>/system32/hal.dll. I then did "ctrl+alt+del" to restart and received the message …

Member Avatar for chrisbliss18
0
271
Member Avatar for tayspen

how would i coppy only specific things out of a directory. say *.mp3. I am able to copy the whold directory but i only want specific endings. this is part of the copy code [code] try { Directory.CreateDirectory(targerDirectoryName); string[] files = Directory.GetFiles(sourceDirectoryName); foreach (string fileName in files) File.Copy(fileName, targerDirectoryName + …

Member Avatar for tayspen
0
412
Member Avatar for Acidburn

Hello, I've created a file and put datat into it, only problem is that throughout the operation of the program the file is "amended" and bits are added to the file. However I'm wonder if theres a way to delete the file contents so next time someone starts the appilcation …

Member Avatar for Drowzee
0
135
Member Avatar for katew

i am having a problem to store the item and call from it.It is like you already created a text file,then you need to assess item from it.the item is in disorder. :sad:

Member Avatar for katew
0
339
Member Avatar for sifuedition

What is happening here? [code] void palindromemgr(ifstream& in, ofstream& out, Stack& S) { string c; //candidate while (true) { cout << "entering first loop" << endl; //debugging line if (in.eof()) break; in >> c; cout << "this is the value in c :" << c << endl; //debugging line for …

Member Avatar for sifuedition
0
164
Member Avatar for Acidburn

Hello I figured out my other problem, now left with another 2. One which I beleive is a logic error since if I enter A it will output AA but I cant seem to solve that one. Also the other is that I'm using app (append). How can I delete …

Member Avatar for Dave Sinkula
0
95
Member Avatar for Acidburn

hello, another stupid question but what is wrong with this? [code] infile.open("new.txt",ios::app); if (infile.fail()) { cerr << "Error"; exit(1); } [/code] ever since I've added the ios::app it keeps printing error and then haulting but from my resoruces if you want to append a txt file thats whats the syntax …

0
80
Member Avatar for sifuedition

I need to use a class for a program that reads an input file, prints the file, sorts the list then prints the sorted list. This is for a Programming II class. I can see how to print and sort. My issue is the input file and the array. I …

Member Avatar for sifuedition
0
171
Member Avatar for djbsabkcb

I am trying to write a program that reads in a file of numbers, writes to a file and displays the numbers in correct order. I don't fully understand how to read the file and pass that information into my class declarations in order to output before and after the …

Member Avatar for Stoned_coder
0
142
Member Avatar for RichardPM

Windows ME Whenever I try to delete a file, I receive a message "Cannot delete ___. Access is denied. The source file may be in use." This happens no matter what file I try to delete. What could be using every file on the C drive? How do I regain …

Member Avatar for J_Search
0
129
Member Avatar for sifuedition

Well, here is the gist of the problem. When I read in a file of integers, if there is a formatting character at the end, the last integer is repeated. For instance, in the code, it is reading i01.dat. If that file reads as follows: 2 3 4 5 with …

Member Avatar for vegaseat
0
185
Member Avatar for tayspen

Ok so i want to create a file [CODE] File.Create("..."): [/CODE] I want it to be able to detect the user that is on so it automatically creates it on there desktop. Is this possible.

Member Avatar for tayspen
0
155
Member Avatar for clam

Hi Guys. Basically I was wondering if it is possible to Append to the START of the file, instead of the end? For a bit of background information, I have a lump of raw data in hex (they are samples collected from a microphone on a microcontroller then transferred to …

Member Avatar for Thong_Ispector
0
237
Member Avatar for quezl

I have a problem when I'm attempting to access one particular web site (which happens to be my own). It's basically giving my a file download dialog box wanting me to "open the file at it's current location" or "save file to disk" no matter how I try to get …

Member Avatar for quezl
0
254
Member Avatar for tayspen

OK i need to be able to let the user click a button to open a filedilag then the browse to theflie/folder they want and hit ok. that will the bring up another one asking where they want to put it. bassically it asks a user whatfile they want and …

Member Avatar for plazmo
0
505
Member Avatar for a1eio

I want to read everything from a file using python. the one problem i am having (note: EVERYTHING from a file) is that python is returning an EOFError when i know that it's not the end of the file, is there any way to just read the damn thing till …

Member Avatar for vegaseat
0
534

The End.