General C++ Programming - November 2013 (Page 17)

Corporate Data Sales
 
Corporate Data Sales Write a program that uses a structure named CorpData to store the following information on a company division. Division Name(North, S...
[1 reply] : Your getData() function should not be for a specific division. Re-writ... (by Ispil)
Currency conversions
 
The following program takes in amount in US dollars and converts it into another currency. Create the functions that match the prototypes. Make sure that functi...
[1 reply] : What are you asking? Do you need the calculations? If so the calcula... (by Scott7975)
donut shape
 
hey guys I need help please tell me what i am doing wrong Create a file that will contain the following functions: VolSphere() AreaSphere() VolCone(...
[9 replies] Last: "geometry.h:28: error: too many arguments to function âfloat VolDonu... (by Mats)
Stack Container Function
 
Hello! I need some help with my function: (Everything is compiled successfully btw) template <typename T> bool contains(stack<T> &s, const T &val) { for...
[6 replies] Last: Glad it benefited you too, thanks all! :) (by closed account S3TkoG1T)
Self Creating Integers
 
Hello. I know it would be easier to create an int array, but I want the program to create integers as the user requests. For example, if the user enters 4, the ...
[3 replies] Last: You could probably fake it using a std::map or std::unordered_map ... (by long double main)
need to validate input in this array code.
 
#include <iostream> #include <string> using namespace std; int main() { // Declare a named constant for array size here const int MAX_NUMS = 10; ...
[no replies]
need help on an assignment please!
 
/* November 14,2013 COP 2000 assignment #4 */ #include <cstdlib> #include <iostream> #include <cmath> using namespace std; void intRand (int &); void showMen...
[6 replies] Last: Try to understand all the changes and modify them as you wish. /* No... (by condor)
Inserting a new element into a string array
 
I have the structure defined in the code below and need to insert a new string into the middle of the string array. I know there is a way to insert a new elemen...
[2 replies] Last: If possible you can use std::string and all you have to do is <string_... (by a k n)
Simple Reset timer help!!
 
Im in desperate need of a simple source code that will reset my temperature sensing program written in c plus plus after 30 seconds. Im using a 12f675 pic chip ...
[5 replies] Last: It may be basic.. I was told it was C... could be wrong though. thx (by druid1200)
Program using linked node lists and pointers, no idea how to complete it!!
 
Here is my program thus far (not even sure if I declared everything correct for ptr 2 and 3), now I am very bad with pointers and know even less about nodes. So...
[no replies]
Booleans and Functions
 
I am writing a code where I have to find out the spot a letter is in. I am getting an error with assigning a function using a boolean operator. bool is_m...
[10 replies] Last: Gotcha, I got it to work. Thanks for the help. (by thiskid)
Arrays, File Access, and other things
 
Hey everyone. Im working on a project using temperature sensors. the sensors automatically store the temperature in a file as the 21st element in that file in t...
[no replies]
by Emtiaz
class declaration
 
I was confused in the following declaration of f. Is f variable, if yes then what type of var? Thanks. int main() { ios::fmtflags f; f = c...
[1 reply] : Yes... f is a variable. It is of type ios::fmtflags , which is a cla... (by Disch)
Undefined Reference to "function" error
 
Hello! I am new to this forum and to coding so any pointers would be greatly appreciated. I am currently working on a code, but I keep getting a error as follow...
[2 replies] Last: Ahh, that makes sense. No wonder it couldn't link the functions. I gue... (by pgagl623)
Avoiding use of Globals with Callback Funcs
 
I have been developing a game recently using GLFW, and have done quite a bit. My current problem is that I have a class for processing battles, which needs to b...
[4 replies] Last: Welcome! You'll find that a lot of API's use a similar method for pass... (by Lodger)
Overloading == Operator and std bad_alloc error
 
I've been trying to code for this question, where I have to add and compare two polynomials. Issues I have been facing are, with the compare function, whether t...
[4 replies] Last: I'm not exactly sure shy you are getting a std::bad_alloc error. You ... (by doug4)
Simple Program - Printing Out Letters
 
Hello again! #include <stdio.h> int main () { char a,b,c; printf("Enter the 1st character: "); scanf("%s",&a); printf("\nEnter the 2nd character: ...
[no replies]
by jeb41
converting strings to floats with "strtof" isn't working for me
 
I'm trying to convert a string to a float and I can't figure it out as my code keeps failing to compile at the line where I use the strtof function, can anyone ...
[5 replies] Last: but with your example does anything need to be in the parenthesis? I... (by Danny Toledo)
Timing Problem
 
Hey guys, can someone help me with a function subprogram or a set of statements that allow me to do something within a time limit. I want to create a self-regul...
[no replies]
problem with custom made stoll() function
 
My apologies to L B who already showed me an easier way to do this... I'm doing this out of general interest only... :-) So the stoll() (string to long long) fu...
[2 replies] Last: it was the pow() function! apparently... :-) AeonFlux1212 (by AeonFlux1212)
November 2013 Pages: 1... 1516171819... 46
  Archived months: [oct2013] [dec2013]

This is an archived page. To post a new message, go to the current page.