2,025 Topics

Member Avatar for
Member Avatar for thecoolman5

Hi. I am just wondering how to restore a number that is in scientific notation. So, take a number that is in scientific notation, turn it into standard form, and resave the variable in standard form. here is an example of outputing the variable amount in standard form: [CODE]n1.setf(ios::fixed); cout …

Member Avatar for raptr_dflo
0
246
Member Avatar for maverick01

the uploaded is a assignment and i want to solve this task using the library fstream and using the tellp ,seekg other functions also can some body help me in that how to use all these things..!!I WROTE A FUNCTION ALSO BUT IT IS NOT READING THE FILE??? THE FUNCTION …

Member Avatar for MandrewP
0
236
Member Avatar for Torf

Hello, I do not understand the following parts in bold - how it works, what is is for..etc. I'm not following the book's explanation.. [CODE]#include <iostream> using namespace std; [B] double totalCost(int numberParameter, double priceParameter);[/B] int main( ) { double price, bill; int number; cout << "Enter the number of …

Member Avatar for MandrewP
0
284
Member Avatar for iamthesgt

In working on a logfile for an application, I needed to limit the size of the logfile to 1000 bytes. Since it is not possible to delete lines from a file in C++, I used the following steps: Rename the logfile to a temporary name. Read the temporary file. Write …

Member Avatar for iamthesgt
0
230
Member Avatar for EndDream

Hello I appreciate the time you are taking to read my thread! I have a background in real estate development and no programming experience. I already have a bachelors in Business (emphasis Finance). I am currently getting my MBA in an evening program at one of the top 20 schools …

Member Avatar for peter_budo
0
97
Member Avatar for vlaskiz

Basically I dont even know if I named the thread properly but lets get on the story. I've got a list of wares (in text file) with its name, date it was brought to store, date it was sold, amount and price. [CODE]Pigema //name date it was brought sold amount …

Member Avatar for Ancient Dragon
0
179
Member Avatar for Zhassan

Hi! I am writing programm that will determine what number is drawn in bmp image (there is only one digit number in image). So, I am trying realize it the following way: 1. read image pixel by pixel 2. create a two dimentional array of pixel values 3. if color …

Member Avatar for daviddoria
0
98
Member Avatar for sha11e

I'm trying to make a cllient-server chat that only needs to be able to handle 1 connection. First, I have a data-type question: 1. At the moment I am using this code to get messages [CODE] BufferedReader ins = new BufferedReader(new InputStreamReader(sock.getInputStream()));[/CODE] And this code to send messages [CODE] PrintStream …

Member Avatar for babu15
0
200
Member Avatar for apollo1987

Hi there, I'm looking for a Cross-Platform to build [B]native[/B] mobile apps. It should meet the following requirements: - It should support these OS: iOS, Windows Mobile, Android - I'm [B]NOT[/B] looking for frameworks to build [B]WEB[/B] apps using HTML, JS, and so on. The wanted platform/tool/framework should use a …

Member Avatar for stbuchok
0
89
Member Avatar for sha11e

I found a client/server code and I am getting this error: [QUOTE]java.net.SocketException: Software caused connection abort: recv failed[/QUOTE] Server code: [CODE] import java.net.*; import java.lang.*; import java.io.*; public class Server{ //port number should be more than 1024 public static final int PORT = 1025; public static void main( String args[]) …

Member Avatar for DavidKroukamp
0
327
Member Avatar for coxxie

You are the owner of a hardware store and need to keep an inventory that can tell you what different tools you have, how many of each you have on hand and the cost of each one. Write a program that initializes the random-access file hardware.dat to 100 empty records, …

Member Avatar for VernonDozier
0
2K
Member Avatar for ilaunchpad

I'm trying to make a camera app using AVCaptureSession. For now I just want to see if the video input works or not. But it looks like there is no input and I can't seem to understand why. - (void)viewDidLoad { [super viewDidLoad]; session = [[AVCaptureSession alloc] init]; [self addVideoPreviewLayer]; …

0
119
Member Avatar for nelson1234

Apple's latest version Beta iOS 5 mobile OS and one of the ... That includes home screen, multitasking, adjusting the device volume. ... In future, apple has planned to replace assistive touch in place of hardware button.

2
89
Member Avatar for coxxie

having issues with my program running propperly. I think i have it right but i need a more skilled eye to take a look at it for me and set me in right direction. the code will complie, but everything i enter comes up invalid when some of it should …

Member Avatar for coxxie
0
457
Member Avatar for steve_kamlp

Hello! On Android if the application which runs can not get permissions (even if user wants) if the Android is not root mode. That means the application can not use some API of Android. That means there are [B]official (supported) root API[/B]s of Android (by Google) ? If yes, can …

0
58
Member Avatar for khelly

at first, plec correct me this one... [code] std::string explanation; // this upper coding char explanation; //after entering void to display if(item_code=='A') explanation='BABY WEAR'; else if(item_code=='B') explanation='CHILDREN WEAR; else if(item_code=='A') explanation='LADIES WEAR'; else if(item_code=='A') explanation='MENSWEAR';[/code] BABY WEAR and others was error, what should i put? plz correct my coding above …

Member Avatar for gusano79
0
164
Member Avatar for wanguard

This is the program I wrote for my CS project. Compiler is TurboC++. I initially added a lot of garbage code in it and am having a hard time cleaning it up. Can you guys please suggest improvements in the code below. Thanks in advance. [CODE] //STUDENT MANAGEMENT #include<conio.h> #include<fstream.h> …

Member Avatar for adityatandon
0
174
Member Avatar for fmasroor

For some reason, when I do an output.put, it is not doing anything. [CODE]#include "stdafx.h" #include <fstream> #include <Windows.h> using namespace std; void main() { fstream input, output; int in1=0, in2=0, x=0, k=0, l=0, max=0; input.open("input.txt", ios::in); output.open("output.txt", ios::out); while(input.good()) { input>>in1; input>>in2; for(x=in1; x<in2; x++) { k=x; l=0; while(k!=1) …

Member Avatar for adityatandon
0
82
Member Avatar for khelly

[CODE]#include<iostream> #include<fstream> #include<string> #include<vector> #include<algorithm> using std::cin; using std::cout; using std::string; // clothing codes struct codes { char code; const char* explanation_1; float total_sales; }; codes CODES[]={'A',"BABY WEAR",0.0F, 'B',"CHILDREN WEAR",0.0F, 'C',"LADIES WEAR",0.0F, 'D',"MENSWEAR",0.0F, 0,NULL,0.0F }; struct RECORD { char category; int item_number; float price; }; const string filename="jualan.dat"; int menu(); …

Member Avatar for khelly
0
122
Member Avatar for khelly

so, this is my coding. [code]#include<iostream.h> #include<fstream.h> #include<stdlib.h> #include<iomanip.h> using std::cout; using std::cin; using std::endl; struct menu typedef struct menu RECORD; void addRecord(RECORD input[], int arraycounter); void printRecord( input[]); void printAllRecord( input[]); int main() { fstream submit; submit.open("D:jualan.dat",ios::out); { int menuEnter; int arraycounter=0; do { cout<<"\tFamily Outfit Shop"<<endl; cout<<"\t MAIN …

Member Avatar for khelly
0
372
Member Avatar for Kristo.lane

Hi guys, I have written a program that writes a .csv file readable in Microsoft excel. Is there a way I can launch the file with Microsoft excel once I compile and run the program? [CODE] #include <iostream> #include <cstdlib> #include <fstream> #include <cmath> using namespace std; int main() { …

Member Avatar for Kristo.lane
0
270
Member Avatar for muse_squall08

[CODE]#include <iostream> //standard input and output #include <fstream> //file input and output #include <string> //for strings #include <exception> //catches exceptions #include <sstream> //stringstream comes from here #include <algorithm> #include <stack> #include <queue> using namespace std; bool writeFile(const string &data); //writes strings to file bool readFile(); //read file bool palin(const string …

Member Avatar for WaltP
0
2K
Member Avatar for jeevsmyd

I'm using turbo C++. For my SIC assembler I need to read user the input assembly language program from a text file.Each line of the program contains a maximum of 3 words , LABEL OPCODE and OPERAND. LABEL or OPERAND or both can be absent by OPCODE is a must. …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for MasterHacker110

My enscription program enscripts the words in a text file, but when I descript it is all mixed up eg. Origanal text: Name: Master Surname: Hacker Age: 1101 Enscripted text: 6BX5  6BX5  + BX0 6BX5  + BX0 9BXIIHI Descripted text: Name: MasteName: MasteName: MasteName: MasteName: MasteSuName: MasteName: …

Member Avatar for MasterHacker110
0
92
Member Avatar for happygeek

With the recent announcement of an easy way to gain root access for Android phones running 2.3.4, to add to the list of similar exploits for earlier versions and 3.0 and beyond, it should come as no real surprise that the bad guys are taking advantage of the relative weakness …

Member Avatar for Trigle
0
455
Member Avatar for Kathyrine

I am trying to sort a record according to their respective number like this: [CODE] 5 reyes d r 1 2 3 3 delos d k 4 5 6 9 go t r 7 4 5 1 po w w 2 2 2 2 bun b m 3 3 3 …

Member Avatar for Kathyrine
0
5K
Member Avatar for jeevsmyd

I'm making an SIC 2 pass assembler in C++. And I'm not very good at files in C++. The following code segment is supposed to read LABEL OPCODE OPERAND from the input text file . All it has to do is to identify each of those based on the tab …

Member Avatar for jeevsmyd
0
810
Member Avatar for Giggly

Prekė.h [CODE] #include <string> using namespace std; class Prekė { private: string pavadinimas; double pagaminimodata; int kiekis; double kaina; double vartojimolaikas; public: Prekė(); Prekė(string pavad, double pagam_dat, int kiek, double kain, double vart_laik); ~Prekė(); string ImtiPavadinimą() { return pavadinimas; } double ImtiPagaminimoDatą() { return pagaminimodata; } int ImtiKiekį() { return …

Member Avatar for jmichae3
0
196
Member Avatar for rajatchak

[CODE] #include<iostream.h> #include<stdio.h> #include<fstream.h> #include<string.h> class qa { char question[35]; char option[4][20]; int ans; //correct option no (eg 0 1 2 3) public: void getques() { gets(question); cout<<endl; } void getopts() {cin>>option[0]>>option[1]>>option[2]>>option[3]; } void getans() { cin>>ans; } }; void main() { int n; qa q; fstream file1; file1.open("questions.dat",ios::out); cout<<"\n …

Member Avatar for rajatchak
0
216
Member Avatar for ConfusedLearner

Using a text editor (i.e. Notepad), create a text file called Text1.txt and place it into a folder of your choosing. Fill Text1.txt with a sentence and save the file. Then, write a C++ program that performs the following: 1. Reads the sentence from the file Text1.txt and display it …

Member Avatar for bboy_fresh
0
274
Member Avatar for wmurrow

I have to count the number of records being read in and print them to the screen. A record consists of: website name (temp.url), website revenue (temp.rev) and website hits (temp.hits). These are all read in and returned as temp. For the life of me though, I can't figure out …

Member Avatar for wmurrow
0
110
Member Avatar for abhiagro

can someone please help me with this code? i am getting the following error : [Linker error] undefined reference to `enr(int, int, double, double, double)' thanks #include <iostream> #include <fstream> #include <math.h> #include <string> using namespace std; float ran1(long *); #define IA 16807 #define IM 2147483647 #define AM (1.0/IM) #define …

Member Avatar for Schol-R-LEA
0
270
Member Avatar for fmasroor

Using microsoft visual c++ 2010. Everything is screwing up. I want to take an input file, write to an output file, and use the lines of the input file as strings. But... On previous run, I didn't have that last printf line. So everytime I run it, it just prints …

Member Avatar for Schol-R-LEA
0
334
Member Avatar for nyuszi

Hi i need a little help. i want to read a multi array from a file but code blocks said a lots of error and i dont know whats the problem. can u help me? [ICODE]#include <iostream> #include <cstdlib> #include <math.h> #include <fstream> #include <sstream> using namespace std; int maxn=100; …

Member Avatar for nyuszi
0
260
Member Avatar for JPyo

Hey guys, So I have to convert my previous code into a code using pointers and dynamic storage and the problem is, I have no idea how. I have already read on another forum's examples of Pointers and watched a few tutorials (simple ones) and read from my textbook. Unfortunately, …

Member Avatar for mazzica1
0
137
Member Avatar for crc0002

Here is the program assignment: [icode] Graph abstraction is important because it is used in many different areas of science, engineering, computer sciences and software engineering. For instance, the Internet makes use of graphs to represent the Internet router network configuration in order to determine the best route for forwarding …

Member Avatar for mazzica1
0
1K
Member Avatar for salah_saleh

Hello, I have a problem in reading p5 PGM file: [CODE] ifstream::pos_type _Start, _End, _Size; ifstream::off_type _newStart; char * memblock; vector<vector<int> > initMatrix ; std::ifstream inf; inf.open("a.pmg", ios_base::in | ios_base::binary); if (inf) { std::string line; for (int i = 0; i<3 ;i++)//skip the first 3 lines that contain the info …

Member Avatar for mazzica1
0
821
Member Avatar for vlaskiz

So here I am, having a difficult time figuring out what's the problem, first of here's the code: [COLOR="red"]Preke.H[/COLOR] [CODE]#include <string> #include <sstream> #include <iomanip> using namespace std; class Preke { private: string pav; // prekės pavadinimas int atdata; // atvežimo į parduotuvę data int pardata; // pardavimo data int …

Member Avatar for mikrosfoititis
0
275
Member Avatar for ziggystarman

Passing Managed ByteArray to Native C++ DLL Anyone could help regarding passing ByteArray containing image data from axis camera to Native C++ DLL, Both compile OK, but DLL does not write ByteArray data to file?, just wondering if this is the correct way to pass ByteArray's to C++ DLL's here …

Member Avatar for ziggystarman
0
2K
Member Avatar for nickThebeginner

I am using window 7 as a operating system and i run this code in same os it shows the problem related to file handling but this problem wasn't occurred on xp and vista whats the problem ........???????????? try to run on win 7 and xp you will get the …

Member Avatar for mazzica1
0
186
Member Avatar for hemj

Can someone please tell me why I am getting an error message saying 'temps' is uninitialised??? [CODE]#include <iostream> #include <string> #include <fstream> #include <sstream> #include <cmath> #include <iomanip> #include <cmath> #include <cstdlib> using namespace std; struct record { string websiteUrl; double revenue; int hits; }; struct totals { double totalRevenue; …

Member Avatar for mikrosfoititis
0
129
Member Avatar for Vasthor

what I mean by undefined error is because I don't know what the error is about. :P, actually it's because the error not from the code itself, but it's about a compiler that can't defined some sort of file... btw, as title said, the error is from the code in …

Member Avatar for gusano79
0
238
Member Avatar for Nikesh2014

[CODE]#include<conio.h> #include<stdio.h> #include<iostream.h> #include<process.h> #include<dos.h> #include<time.h> #include<fstream.h> #include<string.h> class getInfo { int dep; int with; int bal; int year; int mon; int day; char des[100]; public: getInfo() { dep =0; with =0; bal =0; year =0; mon =0; day =0; strcpy(des,""); } int year1() { return year; } int month1() …

Member Avatar for Schol-R-LEA
0
134
Member Avatar for Vasthor

these one code, from line [63-71] of the original code [CODE] // for adding more students cout << endl << "Want to add more student?(yes/no): "; string add_student; cin >> add_student; if(add_student == "yes") { student_counter = 0; } [/CODE] the program seems "doesn't detect" the cin code above, it …

Member Avatar for Vasthor
0
252
Member Avatar for Wootens

hey guys, I'm writing a program and trying to output data to a file and I'm getting this error: 1>------ Build started: Project: GenericProgram, Configuration: Debug Win32 ------ 1> Source1.cpp 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\fstream(1116): error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>' 1> with …

Member Avatar for vijayan121
0
161
Member Avatar for jackly94

Ok i have a problem which i cant seem to figure out why it is not woriking, First off When i do Enter in some Details and want to enter Records to the end of File it give me the choice of enter in the Details. When display the Array …

Member Avatar for jackly94
0
212
Member Avatar for wmurrow

Hey all. I'm trying to get the FindDaysOver function to grab the avg result from the CalcAvg function result in main. What am I doing wrong? Any help would be appreciated! [CODE] #include<iostream> #include <iomanip> using namespace std; double FindMax(double [], int); double FindMin(double [], int); double CalcAvg(double [], int); …

Member Avatar for WaltP
0
148
Member Avatar for smmcfarl

I am working on a binary search tree and have came across a few problems that I can not figure out how to correct and was wondering how to fix them. In my program I am adding, deleting, printing, updating, and counting the total number of nodes. The only things …

Member Avatar for smmcfarl
0
317
Member Avatar for triumphost

I have a file that has the layout: [CODE] 0 0 0 1 1 0 1 1 [/CODE] I want to read it into a multidimensional array and use the values. The thing is I don't know how to read it in.. I can read the amount of columns and …

Member Avatar for triumphost
0
244
Member Avatar for deeps2_daniweb

i made a program in dev c++ to merge contents of two files into a single file but the merged file is showing garbage outputs. question:- Write a C++ program to merge the content of two files namely “Employee.txt” and “Salary.txt” into “EmployeeDetails.txt”. Sample contents of Employee.txt EmployeeName EmployeeNumber Department …

Member Avatar for raptr_dflo
0
2K

The End.