General C++ Programming - December 2016 (Page 13)

Issue with my program
 
Hey, I've been trying to build a program that asks for *number of students *grade for each student *calculates total grades *gives min/max grade *calculates ...
[4 replies] Last: "I don't think count should be declared as float because average is al... (by closed account 48T7M4Gy)
Infinite loop error
 
Hello. So i am currently in college doing programming and i'm having an issues and no one can assist me right now so i'm posting it here for assistance. What a...
[8 replies] Last: Alright i will thank you both for the assistance. (by PulsarNova)
by glaz3r
void function error!
 
#include <iostream> #include <fstream> #include <string> using namespace std; const int ARRAY_SIZE = 1000; struct Data{ string bookTitle ; string...
[2 replies] Last: Thank you for your reply to explain for me where my mistake is. (by glaz3r)
Two dimension Arrays - Segmentation Fault
 
So i finished my code, for a 2 dimensional array homework, and when i run the program i keep getting an error, " Segmentation fault(core dumped)". I am not sure...
[1 reply] : Are you sure it is successfully accessing the input file "twod.dat"? T... (by Chervil)
Paragraph Alignment not working
 
Hi i'm working on a project that involves you asking the user for a paragraph response and then having them choose what alignment they want, i have everything i...
[1 reply] : Duplicate. Please address replies to: http://www.cplusplus.com/forum... (by cire)
Structure program
 
Hello - I am new here and am stumped as to why this snippet yields 34. Can anyone shed some light on this for me? struct sct { int t ; };...
[4 replies] Last: Actually yes - I think I understand it now. In my own terms: gaz is ... (by twckfa16)
Variadic pointer to member as template
 
Is there any workaround for this type of situation: struct Struct { int member; int member2; char member3; }; template<int Struct::*...pMembers>...
[2 replies] Last: It seems you want to deduce non-type template parameters from function... (by Cubbi)
lottery checker program!
 
#include<iostream> #include<string> #include<cstdlib> #include<time.h> using namespace std; //function prototypes void genwinNumbers(int ); void displayNumbe...
[1 reply] : Line 38: userTicket is an uninitialized pointer. When you pass it to... (by coder777)
looping structures and arrays
 
hie can i please get someone to write this program for me. Problem: Write a C++ program that uses looping structures and arrays to (1) Display your ID line ...
[2 replies] Last: If you want someone to write a program for you, please post in the "Jo... (by MikeyBoy)
movie theater seating
 
# include <iostream> # include <iomanip> using namespace std; void seats( double , int); void mapSeats(); int main() { const int rowNum = 20; double rowV...
[1 reply] : 1) Look at the conditions on lines 79 ad 83. Under what circumstance... (by MikeyBoy)
trouble with array and files
 
Here is my assignment im having trouble with the reading the file function Let’s consider an input file that contains student id (int), first name (st...
[2 replies] Last: http://www.cplusplus.com/forum/general/204136/ (by closed account 48T7M4Gy)
problem answer please
 
Write a C++ program that takes Two numbers from the user as Start and End Variables, then sum the numbers (from Start Value to the End value) to find their Ave...
[2 replies] Last: CHECK THIS : http://projectsindia.in/category/c-plus-plus-programming-... (by navdeepk)
Sorting String
 
void sortMovieTitle(Movie topMovies ){ string name = topMovies .title; for(int x = 0; x < SIZE; x++){ if(name > topMovies[x+1].title){ topMovies ...
[5 replies] Last: Check here for the String Functions: http://projectsindia.in/c-plus-pl... (by navdeepk)
Runtime to terminate it in an unusual way
 
Header file // FILE: pqueue2.h // CLASS PROVIDED: PriorityQueue (a priority queue of items) // TYPEDEF and MEMBER CONSTANT for the PriorityQueue class: //...
[1 reply] : here is the source file for testing and i can only pass the first test... (by riyadhhossain01)
Help with code using arrays
 
Hey everyone! i'm new here and i need help with this assignment and my code. What i need help on in particular is the "string store ". "Write a program that wi...
[6 replies] Last: Try this C++ Arrays : http://projectsindia.in/c-plus-plus-program-fo... (by navdeepk)
Planet simulation with pass by reference - force vector won't update!
 
Hi there, I'm fairly new to this, but I'm using C++ to simulate a basic planet orbiting around a sun. I'm using a 'leapfrog simulation' to update the positio...
[2 replies] Last: cire's point about the arguments being the wrong way round in the call... (by lastchance)
median function with twogiven arrays!
 
#include<iostream> using namespace std; double getMedian(int*, int); void printArray(int , int); int main() { const int firstSize = 3; const int secondS...
[1 reply] : First, please use code tags. See http://www.cplusplus.com/articles/jEy... (by keskiverto)
Could anyone explain to me what this line means?
 
int a = b.size() - 1;
[3 replies] Last: You do not show the type of b. If the code is legit, then the b must ... (by keskiverto)
drink machine simulator help!
 
#include<iostream> #include<iomanip> #include<string> #include<cmath> using namespace std; const int SIZE = 5; struct DrinkingMachine { string name; double...
[3 replies] Last: mine keeps popping out as 0 Sounds bad. (by closed account 48T7M4Gy)
Why is the keyword template necessary in the following specialization?
 
Hi, What does template before value_of<Iterator> do? template <> struct value_of_impl<iterator_facade_tag> { template <t...
[2 replies] Last: Great answer!! Thanks Juan (by JUAN DENT)
December 2016 Pages: 1... 1112131415... 18
  Archived months: [nov2016] [jan2017]

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