4,718 Topics
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; …
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 …
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.
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 …
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 …
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()) …
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? ;-)
ok in my documents some files names are coloured blue??? y is dat????
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 …
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 …
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 …
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 …
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 …
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 …
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... …
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 …
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 …
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 …
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 …
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 …
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 …
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 …
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 …
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 …
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?
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 …
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 …
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 …
[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 …
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 …
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 …
[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 …
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 …
[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 …
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 …
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 + …
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 …
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:
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 …
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 …
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 …
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 …
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 …
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 …
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 …
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.
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 …
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 …
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 …
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 …
The End.