55 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for nivedita5

I am working with a code which stores the information of customers in a file called customer_details.txt then asks the user to enter a name and then searches for the name in customer_details.txt, if the name is found, the entire details of the user is displayed on the output screen. …

Member Avatar for 2teez
0
3K
Member Avatar for nathan.pavlovsky

Hi all! Whenever I am working with my code in my main.cpp file, I can call character-handling functions like * isdigit * isalpha * isspace * toupper without importing the `cctype` library. However, my C++ How to Program Book shows that the cctype library must be imported before the functions …

Member Avatar for nathan.pavlovsky
0
258
Member Avatar for can-mohan

Hi, As we know constructor doesn't have any return value so it is not good idea to perform exceptional handling inside constructor.SO i would like to know if i am opening a file inside constructor and due to some reason (file not exist) failure happened inside constructor then how to …

Member Avatar for can-mohan
0
383
Member Avatar for nuller

fstream file; file.open("PasswordGenFile.dat",ios::out); In writing into a .dat file what does the following line mean? file.write((char *) this, sizeof(PasswordGenerator)); And how can i convert this bit of code if i want to write it into a .txt file?

Member Avatar for Duoas
0
486
Member Avatar for samson.dadson.3_1

the problem I have here is: when I input an integer it works fine, but when i input any other thing, it doesn't give me a chance to input again when the loop iterates, it just keeps printing "error type the right thing" to the screen even though "cin var" …

Member Avatar for samson.dadson.3_1
0
2K
Member Avatar for userasad

I have a text file and i want to replace a word from a specific location. For example want to replace 5th word from 12th line of file. How i can do that?

Member Avatar for Rizwanrana786
0
255
Member Avatar for moaz.amin.37

Following exceptions are `Checked Exception` or `Unchecked Exception` ArrayStoreException IllegalArgumentException

Member Avatar for JamesCherrill
0
284
Member Avatar for Fighter01

I am asking a question about file handling within python. I am capable of creating a text file which can then be read via python. However, i am trying to create a python Recipe storer and therefore i would need to be able to store recipes (entered through python) with …

Member Avatar for Fighter01
0
520
Member Avatar for mukulnimker7751

Hi All, i am here with a problem in file handling in java. i need to search all the files on system with extention *.fdr. which are not less den one day old. then i need to convert the selected file to csv which is perfomed by a command in …

Member Avatar for JamesCherrill
0
367
Member Avatar for anku83

I have a text file transa.txt .I want the contents of the file to be filled in the array cell by cell.example the file reads: 1 1 1 1 0 0 1 0 1 1 1 1 so i want arr[0][0]=1,arr[0][1]=1,arr[0][2]=1...... Can someone please help me with this..I am stuck …

Member Avatar for stultuske
0
626
Member Avatar for tharindu123
Member Avatar for sam wage

I have attached one code of my project and i need a help in that. The code is running without any error but i am stuck up in modifying that how to make a statement, of invalid format of date or time if the user enters the wrong format should …

Member Avatar for Fenrir()
0
208
Member Avatar for sonu_1

hi i have problem , i want to modify a file without copy to another file so any one can give how to do it ? I tried following method to modify a given location or pointer in file but did not work . ofstream outfile; outfile.open ("test.txt"); outfile.seekp (3,ios::beg); …

Member Avatar for deceptikon
0
330
Member Avatar for mahesh113

Hi All, Could you please clear my doubt why this second catch block is called when exception is thrown only once. #include <iostream> using namespace std; class E { public: const char* error; E(const char* arg): error(arg) {} }; class B { public: B() {}; ~B(){cout<<"~B() called"<<endl;} }; class D: …

Member Avatar for deceptikon
0
346
Member Avatar for mesbahuk

I have been working on a conversion project for last few days where I need to convert a Java library to C#. At one point I came to java's certain feature called [Exceptions Thrown by a Method](http://docs.oracle.com/javase/tutorial/essential/exceptions/declaring.html). Here is a little glimpse of it: public boolean isRequest() throws NullPointerException { …

Member Avatar for Ketsuekiame
0
303
Member Avatar for sana.f.qureshi

Telling you before hand, i am just starting to learn, so please refrain from making fun of me i k i am real weak in this. ok here is what i need to do, i have been trying for ages but i am having huge problem creating dynamic checkboxes. This …

Member Avatar for ddanbe
0
226
Member Avatar for RounaqJJW

Program to Find the words starting with a or A from the source code itself and then modify it by removing the words from the source code and put it in another file. The following code doesn't work. Pls Help!!! #include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> void Write(fstream &a, char b[]) { …

Member Avatar for Lucaci Andrew
0
493
Member Avatar for kamilacbe

Hi, Can anybody help me out to solve string handling without using predefined spilt function , here come the questions for eg i have a input string as "hai welcome to the sample " so i should display as follows hai welcome to the sample pls advice, thanks for your …

Member Avatar for kamilacbe
0
185
Member Avatar for pivren

consider the following program #include<iostream.h> #include<fstream.h> void main() { int no; ifstream fin; ofstream fout; fout.open("create,dat",ios::app); fout<<"What is your fav. number"; fin>>no; fout<<no; fout.close(); } NOW HERE IS THE PROBLEM WHILE THE PROGRAM IS RUNNING PERFECTLY AND THE NUMBER IS BEING STORED IN A .DAT FILE BUT THE NUMBER IS …

Member Avatar for mrnutty
0
328
Member Avatar for rogerg

Hello, I have a problem when trying to prompt users on two levels with Perl. The first prompt command works fine. But when doing the second command as below, I get Enter a command (count/close/quit) : Enter a command (open/quit). I don't see right away why this happens. Any idea? …

Member Avatar for rogerg
0
239
Member Avatar for Depreciated

Greetings I have a USB RFID scanner. While I have this form1 up, I want to send any keyboard input and put it in a textbox which is in another form(say form2). I tried using this code but to no avail. The first form is named "MainMenu". Every time of …

Member Avatar for Depreciated
0
655
Member Avatar for PrimePackster

Well Guys! I was learning how to read and write class objects from & to file respectivily. And here is a small code that i made...... As far as the code goes its all well.... And i am getting what i want.... But what i want to know is, **where …

Member Avatar for Ancient Dragon
2
186
Member Avatar for UKnod

Here is what I am trying to do: From VB.net open a word template --- Done Populate it from a database ------Done Have word report back with the saved file name so as I can add it to the database history ----Not done. I know is has something to do …

Member Avatar for UKnod
0
152
Member Avatar for manuel.sabu

case 4: { cout<<"Enter the word you want to delete: "; gets(b); f1.open("anotherf.txt",ios::in); f2.open("tempf.txt",ios::out); while(!f1.eof()) { f1>>a; i++; if(strcmp(a,b)==0) { j=i; } } i=0; while(!f1.eof()) { if(i!=j) { f1>>a; f2<<a; } i++; } f1.close(); f2.close(); f2.open("tempf.txt",ios::in); f2.seekg(0); f1.open("anotherf.txt",ios::out); while(!f2.eof()) { f2>>a; f1<<a; } goto menu; } I am trying to …

Member Avatar for NathanOliver
0
163
Member Avatar for manraj kaur
Member Avatar for priya_pawar

Write a program (in a single .c file) with a queue of strings implemented using array. You should write ite a queue type. The program reads a set of strings stored in a file (filename given on command line as argument) and inserts each string in the queue. Then it …

Member Avatar for Ancient Dragon
-1
171
Member Avatar for vishu.bhavsar

Hi all, I am creating one GUI application in java. I need to make menubar visible when particular panel is made invisible. Is it possible by creating an event which will be triggered when panel is made invisible? Can anybody help me? Thanks in advance!!!

Member Avatar for JamesCherrill
0
200
Member Avatar for niyasc

Following is my code for reading from a file. #include<stdio.h> int main() { char s[10][10]; int i=0,j=0; FILE *ptr=fopen("input.txt","r"); char c; while(fscanf(ptr,"%c",&c)!=EOF) { if(c=='\n') { s[i][j]=0; i++; j=0; } else { s[i][j]=c; j++; } } s[i][j]=0; fclose(ptr); for(j=0;j<i;j++) printf("%s\n",s[j]); return 1; } and content of input.txt is A->XAZ|Yz|z X->xZ|x Z->Xz …

Member Avatar for niyasc
0
199
Member Avatar for javanub123

I am having trouble figuring out how to handle events for components that are created when I click a button. I have a class called rows which is used to create a row of components (combo boxes) . I have a button on my form that has an event to …

Member Avatar for javanub123
0
241
Member Avatar for cali_dotcom

hi guys, i am currently building a nice website and i was just wondering about the best way to handle errors, database and webservices errors. i was thinking on implementing a mixture of file and db logging. so basically i would log to db all the time and then i …

Member Avatar for pritaeas
0
141

The End.