49,761 Topics

Member Avatar for
Member Avatar for mikelle

I'm not sure how to approach this problem.. mostly with the while statement.. Download the original attachment The Problem: Write a program on timber regrowth of a harvested forest. The user is to enter the total number of acres in the harvested area, the number of acres which were left …

Member Avatar for Nick Evan
0
267
Member Avatar for mikelle
Member Avatar for camthalion95
0
46
Member Avatar for Tim UK
Member Avatar for mikelle

I'm not sure how to approach this problem.. mostly with the while statement.. Download the original attachment The Problem: Write a program on timber regrowth of a harvested forest. The user is to enter the total number of acres in the harvested area, the number of acres which were left …

Member Avatar for Salem
0
112
Member Avatar for kurt2

How do I make a floating point arithmetic more precise? Let me show the code first, it probably can explain my question faster than in words. [CODE] int main() { double n = 0.0; while (n < 2.5e-9) { // perform some operation n += 5.0e-9; } } [/CODE] Looking …

Member Avatar for kurt2
0
157
Member Avatar for amygoel
Member Avatar for TacklesMcCaw

Well to start let me say that I'm only a newbie, as my status says, but after a year of C++ I have what I consider a pretty good grasp over the basics of the language. I'm still at school for the summer doing an internship and have a lot …

Member Avatar for TacklesMcCaw
0
152
Member Avatar for ar31an

1 4 15 7 8 10 2 11 14 3 6 13 12 9 5 ☺ As you can see there is a ☺ at bottom right corner. After implementing the program the above box will display (lines may not be displayed). Allow the user to hit any of the …

Member Avatar for William Hemsworth
0
206
Member Avatar for Alex Edwards

I don't understand what is happening to my program... I have a feeling that private members are marked private for a reason, because I'm having a serious error with accessing base-class data types via inheritance and declaring friends within classes... If you run the test program after attaching the header …

Member Avatar for Alex Edwards
0
160
Member Avatar for Alex Edwards

Right now I feel fairly unlearned with dynamically allocating memory... even after doing so several times and doing projects that require one to dynamically allocate memory for classes and primitive types. Basically, how does one research allocation for different scenarios such as... [code=c++] #include <cstdlib> #include <iostream> using namespace std; …

Member Avatar for Alex Edwards
0
73
Member Avatar for kux

I have a project that builds in a static library, using visual studio 2005 When I build it in debug mode it all goes fine, but when I build it in release i get the following error: Error 2 error C3861: '_SCL_SECURE_VALIData': identifier not found in file xtree I disabled …

0
79
Member Avatar for comply or die

Hi I'm pretty new to programming started about 3 months ago, and even though I feel I'm getting better, I still find it not easy at all, I got especially trouble with that code, look I want to put into an array of strings sentences with spaces, etc. At last …

Member Avatar for comply or die
0
169
Member Avatar for cybx

I don't no which way to go, get Emu8086 to link to Visual C++ or Visual C++ to Emu8086, I mean I just don't know how to link it, I think Visual C++ links easily to MASM, yet I need Visual C++ to compile to assembly and then Emu8086 to …

Member Avatar for cybx
0
105
Member Avatar for sniper29

[CODE] double indexLowTemp() {ind=1; for (a=0;a<col;a++) {if (low<=temp[a][0]) {low=temp[a][0]; ind=a; } } [/CODE]

Member Avatar for mitrmkar
0
48
Member Avatar for radnik

Hey guys i need some help. I have a txt file which looks like this: 234 56 123 34 456 56 7 45..... 123 3 34 56 56 67 67 2..... . . . Where each line represents a series of points in coordinate system, and the first number in …

Member Avatar for Tigran
0
93
Member Avatar for 007tron

Hi everyone, A couple of questions, please. 1) In my Airports class I am trying to get input data from a text file and put it inside the variables of an airport object that I'm going to create. 2) Then I'm going to try and store my Airport objects inside …

Member Avatar for VernonDozier
0
105
Member Avatar for amarjot

hi... I am a 2nd yr cse student from IP university....can any1 let me know how we can assess a database using a c++ program???

Member Avatar for Ancient Dragon
0
90
Member Avatar for atsx05

Write a program which consists of four functions called from the main( ). The first function will display the user heading; the second function will prompt the user to fill an array of strings (a two dimensional array of char) with a number of words and indicate the preference for …

Member Avatar for VernonDozier
0
115
Member Avatar for Thew

Hello, I need help in my application development. I'm actualy working on editor for simple 3D App, and I need to add window for rendering 3D content into the editor. But as many of you know, 3D apps have the while loop keep rendering. So if I create main editor …

Member Avatar for TacklesMcCaw
0
141
Member Avatar for Linda1

I am practically done with this project but got stumped in one area I am trying to use operator overloading and multiplying 2 to the complex number. Since I used operator* already, how do I call the operator with 2* complex no? How do I write the code for it? …

Member Avatar for Linda1
0
150
Member Avatar for Kadence

I'm trying the following code to combine ints, and then get the original ints back: [CODE]#include <iostream> using namespace std; int getleft(int n){ return (n >> 24); } int getright(int n){ return ((n << 8) >> 8); } int main(){ int i = 15; int j = 28515; int combined …

Member Avatar for dougy83
0
187
Member Avatar for ff4930

Hello everyone, I have a project which is to find the permuted index of each word in a textfile. Im restricted from using STL btw. I read in input.txt and have to output each word and corresponding line number and if it is found multiple times, it will have (numoftimes) …

Member Avatar for ff4930
0
82
Member Avatar for scratchnloved

I'm lookin' for a way to retrieve data from a remote xml feed, and store it as a variable.. Any ides :)? thanks in advance

Member Avatar for Ancient Dragon
0
89
Member Avatar for Noxes

I just recently started coding and have really taken quite a liking to it. I enjoy it very much and hope to get better as soon as possible. I have a couple questions that I would like an answer to start me off. 1. I want to write a program …

Member Avatar for Ancient Dragon
0
238
Member Avatar for henpecked1

I'm being asked to make my default constructor "interactive" by having it prompt for an input and store the three phone number pieces you see below. They are strings, and they get called for display in main with the telnumber yournumber piece of main. How would one do that? [code] …

Member Avatar for henpecked1
0
131
Member Avatar for dwessell

Hi, I'm trying to read in a section of a line from a file, and to compare that to an integer. I know that the piece I'm reading in will be 3 numbers (xxx) and be followed by a space. It will also be the first entry on each line …

Member Avatar for VernonDozier
0
90
Member Avatar for zoner7

I've got something like 400 lines of code at this point, and I realize that not too many people will be inclined to look at it. Thankfully, the majority of it works swell, and I only need part of it examined. I realize that my use of vectors is not …

Member Avatar for zoner7
0
90
Member Avatar for 007tron

hi, i was wondering if anyone could help me out with this. i'm getting a compile error like this: [C++ Error] TestDriver.cpp(26): E2285 Could not find a match for 'Airport::Airport(char *,double,char *,FlightsTL)' i'm really sorry about this but the code is a bit lengthy. it comprises of two header files …

Member Avatar for VernonDozier
0
230
Member Avatar for comply or die

Hi people I'm in urgency, I got an exam on monday with C++ and I might get a thing like there is a sentence like "Jack went fishing on monday", and I need to count the number of "m","e","a"s etc in it, I suspect you got to type a string …

Member Avatar for VernonDozier
0
226
Member Avatar for barnes138

Hello, I'm new to C++ and am trying to figure out how to make my program run over and over again until the user chooses to quit. Any advice would be appreciated. Thanks [code=cplusplus] #include <iostream> #include <cstdlib> #include <string> #include <math.h> #include <windows.h> using namespace std; int num1, num2; …

Member Avatar for stephen84s
0
161

The End.