49,761 Topics
| |
Everything is working on this program except for the output to the table at the end. It will only display the second student I enter but not the first. [CODE]#include "stdafx.h" #include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <iomanip> #include <cmath> #include <vector> #include <algorithm> using namespace std; … | |
I need to make a code that opens a file that contains random numbers and then calculate and display the number of numbers, the sum, and average. I have it so that it will open the file and check for errors and close it. I am also able to get … | |
[COLOR=green]Hi[/COLOR] [COLOR=green]I have a C typedef struct that I need to change to a C++ class.[/COLOR] [code] [COLOR=green]typedefstruct structTag3DScene[/COLOR] [COLOR=green]{[/COLOR] [COLOR=green]p3DObjectGroup pObjGroupArray; /* array of grouped scene objects */[/COLOR] [COLOR=green]int numObjGroups; /* count of grouped scene objects */[/COLOR] [COLOR=green]}[/COLOR] [COLOR=green]f3DScene, /* 3D Scene */[/COLOR] [COLOR=green]* p3DScene; /* pointer to 3D … | |
suppose that x is an int variable, y is a double variable and ch is a char variable and the input is 15A 73.2 choose the values after the following statement executes: cin >> x >> ch >> y; a. x=15, ch='A', y=73.2 b. x=15, ch='A', y=73.0 c. x=15, ch='a', … | |
if alpha and beta were int variables, the statement alpha = --beta is equivelent to what statement? also what would alpha = beta++ be equivilent to what statement. i know you add 1 to the first one but it doesn't seem right. any help would be appreciated. | |
Okay folks. I am writing a c++ program that will take a text file filled with test scores. Test1, Test2 and FinalTest. There are 32 test scores to be processed. I finished this first assignment using pass by reference using things such as: Prototype: [code] void doStatsRef(int [], int, double&, … | |
hey guys i need some help with this input file program im getting input file invalid all the time i have no idea what to do. im supposed to create data files with data for up to 10 students and calculate their average from five perecentages i think i got … | |
[QUOTE=Dave Sinkula;240584](1) Run the program. Use a value bigger than 10 in the main loop. (2) Surely you can make an attempt at these changes. Please enclose posted code in code tags -- just like it says in the little box you reply in.[/QUOTE] I used a double for my … | |
This may seem like an odd question, I'm not sure? I have been programming exclusivley using Dev C, and I now have to complete a project using Visual C++ 2005. I am trying to figure out just exactly how to properly use "handles". Maybe I'm barking up the wrong tree? … | |
please can anyone help me with a c++ project that includes classes,datafile,functions, and some minimal graphics for my class XII project. thank you | |
Trying to write code to concatenate two arrays of pointers to chars (char* example[]) The program should randomly generate a sentence using 4 arrays of prepositions, nouns, adjectives, and verbs. I found a concat algorithm somewhere on the net and modified it to fit my needs but whenever i execute … | |
Hi everyone. I'm having trouble getting groups working in a list box.I'm trying to have two groups. One will be "Done", and the other will be "todo". I'm getting these errors: [QUOTE] In function `LRESULT WindowProcedure(HWND__*, UINT, WPARAM, LPARAM)': `ListView_EnableGroupView' undeclared (first use this function) (Each undeclared identifier is reported … | |
HI, plz can you help me i have a text file like this : [CODE] [LIST=1] [*]telemetre_18_04_2007_11h_08_mn_50sec.dbt [*]1176887334023317 1 D 3 1.486789 124 -17.150263 [*]1176887334050289 1 D 3 1.506669 125 -16.790839 [*]1176887334077692 1 D 3 1.521077 126 -16.517200 [*]1176887334103341 2 D 3 1.579571 127 -15.251071 [*]1176887334130332 2 D 3 1.557395 … | |
I am using borland c++ builder 6.0 can you tell me how to solve this error? [Linker Error] Unresolved external 'hasp_login' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER6\PROJECTS\DONGLE C TESTING VERSION2\UNIT1.OBJ | |
My brain must ave rolled back too. Can someone point out why this is giving me an error (actually a windows error) when i run it, though it compiles with no errors in MV c++? [code=c++]#include <iostream> using namespace std; int returns300() { return 300; } void main() { int … | |
I am doin a project for class that involves c++ programming. I am having trouble gettin it started though i posted the link below to the problem. Can anyone give suggestions to how i should approach this? THanks alot in advance [url]http://cis.poly.edu/cs1114/homeworks/hw03/hw03.html[/url] | |
i have a problem calculating the cost with this code. the code is supposed to use the different call rates to calculte but it only uses the first rate. it is supposed to get the total cost of around 4 calls with different rates..sorry if it is too long but … | |
I know how to right c++ code to determine in an (int) is odd or even. How would I add a boolean function to do the same thing. I have to input an number then determine if it's odd or even. I have to add 3 numbers one at a … | |
Doing Project Euler problem 3. Don't know why code not working. [code] #include<iostream> using namespace std; //largest prime factor 317584931803. bool Primechecker(int); int main() { int greatestprime=1; int limit = 317584931803; int runningcount=1; while(runningcount<limit/2) { if (Primechecker(runningcount)==true && limit%runningcount == 0) { greatestprime = runningcount; } runningcount++; } cout << … | |
hey there! i would like to ask help on how to use the dlsym() in making a dll test program. can somebody gave me a sort of reference for me to study? THANKS | |
I'm trying to create some classes that work together via Operator Overloading. I have the main.cpp and the Distance.h files exactly how I want them, and now I just need help properly setting up my Distance.cpp file to link properly and run accurately with them. Here's a look at what … | |
Hi All, I am calling one exe from my c++ code exe, now i want some(two or three) values in my c++ code exe from that exe which i am calling, Any idea how can it be done? Plz help me out in this. | |
I need to prompt the user for a txt file and display what the text in it. Our example is January Fishing line 132 spools 24 spools Fish hooks 97 packages 45 packages Sinkers 123 packages 37 packages Fish nets 12 ea. 5 ea. Tackle box 75 ea. 15 ea. … | |
Can some one help me to : How to Read integers stored in a text file in the following format : 26 52 23 41 19 61 54 4 19 95 84 25 55 22 (integers delimted by a space.) to be used for sorting later. Have tried following code: … | |
Some computers do not provide a privileged mode of operation in Hardware, is it possible to construct a secure O/S for these computers? Why and Why not? Please I need a feedback. I know it is possible to construct a secure O/S because the operating sys. can create a security … | |
Hi there, I have a problem in breaking a sentence into each string. i have tried to use find() to search for the " "(space), use substr to search from the first string index into the find space number. It works for the first string. But I am unable to … | |
I've know that a pointer to some dynamic memory must be deleted to prevent memory leaks. Now if say a struct/array or some other data structure, each with its own dynamic memory parts. If that structure (class, file...etc) contains the data structure goes out of scope does that automatically free … | |
I am calling one c++ exe from my unix shell script, i am trying to set the env variables using putenv() thru my c++ code. Now i want to use these varibles in my new exe which is there in the same shell script(set by using the previous exe ) … | |
Hey, I just want to start using mfc to create windows objects, i have never tried coding using the mfc and opening the tutorial page on microsoft's msdn is the slowest thing that can happen around here. so i will like someone to quickly give me a hint on how … | |
Hi all, The topic is my question. I’ll explain it more. Just look at the following C++ code segment, [CODE=cplusplus] if(number_1 == number_2); { std::cout << number_1 << " == " << number_2 << std::endl; } [/CODE] Note that, I have put a semicolon just after the right parentheses. It’s … |
The End.