2,025 Topics
![]() | |
I am trying to write a program that computes the area of a right triangle. It has to use a function to compute the area. This is actually a part of a bigger program, but when I couldn't get it to work I isolated this section. I tried looking on … | |
Im trying to write a struct for a binary header of a sun raster file to a file on disk. i have a struct for the header data: [CODE] struct rasterfile { int ras_magic; int ras_width; int ras_height; int ras_depth; int ras_length; int ras_type; int ras_maptype; int ras_maplength; }; which … | |
This is my program but that I have to put it into structure form but without using member functions but i dont see how I can make it run #include <iostream.h> #include <string.h> #include <stdlib.h> #include <iomanip.h> struct hope() { int x; char st_name[25]; char st_address[75]; char st_color[25]; float f_ccost; … | |
I'm making a program that takes the words from one text or data file and transferes it to another. there are not supposed to be any spaces in the second file. I need to know why I can't make this code work. It would not be the completed code but … | |
I have to use a while loop to display everything 3 times and then i have to use a do while loop to do the same thing when i added my while and do while loop it keeps on repeating like a millions times and i cant stop it can … | |
This is my program but i cant get it to calculate my cost These are my calculations: 1) if the color of the car is blue and the cost of the car is less than 1200 add 10% of the cost of the car to the cost of the car … | |
This is my new program and it is like so killing me I dont understand all those errors I keep getting // Description: This is program 1 of 3 // Display person name, address, calculated and // actual cost of car and color of car 3x. 1 using the For … | |
hi im havin a problem w/ printing a linked list. my program reads two input files and makes two linked lists out of them, and apend the lists and print it out. my input files look like this: 1 2 3 4 5 (input1) 11 22 33 44 (input2) here's … | |
I have to display this prrogram 3 different times using a FOR LOOP but he never showed us how it goes or where it goes I read it in my book and try many different things but nothing works its like it has to display three different people's name and … | |
:mad: :mad: :( :( I've been trying to write this program that is suppose to read in a text file manipulate in and give the following out put infact here is the question Implement a program that uses a form-letter template to generate form letters. Your program should read in … | |
![]() | [color=blue]I've just wrote this program and when i compile, there is an error at the red color fonts.[/color] [color=blue]Can i know what's the error?[/color] [color=#0000ff]thank you.[/color] char quest; char words[50]; int count; int z; ofstream file; file.open("WORDS.txt" , ios::app); file.close(); cin.ignore(50,'\n'); cout << "\n\n Please enter the word that need … |
sir,please correct the errors in this program and also write the algorithm in this program and give me an introduction to this program.Pls send the error free program,algorithm & introduction before 03/09/2004.thank you #include<iostream> #include<iomanip> #include<stdio> #include<cstdlib> #include<cctype> #include<fstream> using namespace std; const int maxchrs=50; const int items=3; const short … | |
Hi, I'm trying to compare two text files (outputs from a database and corresponding spatial table in a GIS) to check for errors. Basically, i'm assuming that the output from the database is correct and any missing/repeat numbers in the spatial table will be errors and should be reported. I've … | |
this is my program and i want 2 put it in terms of modules(functions): #include<iostream> #include<string> #include<iomanip> using namespace std; int main() { //initialization phase. string month; int day=0,cones; char choice; double price; //processing phase. while(day <= 31)//day must not be greater than 31. { cout<<"Welcome to The Ze_Viru$ Ice … | |
Hi, I have this monster program. But, mostly I need help in Main and in Derivs. I know some is written in a juvenille form, but I'm not a C++ student! I have defined all these arrays in the Main function and I need to write an "if" statement in … | |
Hi, I'm trying to run this short code and when it prints out i get about 20 of these "pow: DOMAIN error" messages, and then my results. Can anyone shed any light on this. I'm not acutally a programer, but got thrust into this in a project for another class, … | |
Hi ! I would like to ask your help. Since days, I am reading fstream tutorial in tutorials section as I am trying to put together 3routines: 1., Can write a structure to a file. (ButtonClick1) 2., Can tell how many records in the file (ButtonClick2) 3, Can read back … | |
hai I'm again I already done my program below. the problem when i run no output appear. basically I declare 2 file . 1 for input(InTransFile) another one for input and output(InMasterFile).Both in .dat. I want to compare accno1(masterfile) and accno2(transfile). if they equal have to overwrite balance1(masterfile) and next … | |
Hi everyone, I've recently been having a problem with my current program. I've gotten it to work so that I can enter a word in and it will check the word to see whether or not it is a palindrome by methods of stack/queue. eg. dad "Dad is a palindrome" … | |
#include <iostream.h> #include <fstream.h> #include <string.h> #include <iomanip.h> //for logfile struct log { long number; char date[9]; char time[9]; char gate[2]; }; //for customers struct customer { long number; char initial[2]; char lname[20]; char snumber[7]; char sname[17]; char stype[17]; char suburb[17]; char state[4]; char postcode[5]; }; //constants for array sizes … | |
I have got your site of interest and useful. Iam a student and besides learning programing in class, i take time to teach myself C++ from the internet. i have this exercise in which i got stuck and wish to solicit for help, do you offer help on such? if … | |
I have the code(below) but I can't get the program to close data2.txt and opne it again. Is there a way to reset the starting read position? I want it read through the file for as many times as I want, without ever editing the file. [size=2]#include <fstream> #include <string> … | |
This what I have done so far... (to cscgal and inscissor) As you can probably tell I have't done C++ for long; only a few weeks now so please point out any mistakes that I have made. Here is some evidence to prove that I have tried, even though it … | |
HI, My project is due tommorrow, I am stuck at this error which i have no clue. I have tried all my best to understand what is its cause but couldn't. I really need help. All I am saying is if you can explain why its doing this. ***Problem*** We … | |
I am unable to open a file using the below code in c++. The code used to work before. I am running this program in unix (sun c++ v4.2 compilers). The file I am reading currently is now > 2GB. I am able to read files < 2GB using this … |
The End.