General C++ Programming - February 2019 (Page 3)

Help with custom function
 
Why does the Classe string at line 23 output | ? main #include <iostream> #include <string>//char in stringhe #include "Classi.cpp" using namespace std; ma...
[4 replies] Last: Thanks for the help, now it works perfectly :). (by Yuripetrocchi)
by roses
Need to store a constant even though its a changing variable??
 
Sorry, I do not know how to fully use this website anyways, this code is correct on my task which is: "Write a program that prompts the user to enter: The co...
[2 replies] Last: you can make a const double discount = {values...} and create a funct... (by jonnin)
how to read csv file ?
 
hello , anyone tell me why it not open my csv file ,i write code #include<iostream> #include<fstream> #include<cstdlib> int main() { std::ifstream myFi...
[3 replies] Last: it reads txt file but not csv file (by swahajali)
by GhooSe
c++ ignoring the duplicate
 
EXAMPLE : If the numbers are 4, 43, 6.7, 34, 6, -9, 0 , 22 The second largest value is 34. Example: If the numbers are 4, 43, 6.7, 34, 6, -9, 0 ,43, 22 The sec...
[12 replies] Last: Thanks for your help. (by GhooSe)
by H00G0
Can you think of any good threads tutorial/documentation?
 
Hello guys! I'm thinking about picking up threads but I don't really know where to start. Quick google searches give me either two pages on websites or 300+ ...
[no replies]
control may reach end of non void func
 
This program is supposed to take the square root of a number without using the sqrt function. it keeps giving me a control may reach end of non void function er...
[2 replies] Last: #include<cmath> const double epsilon = 1e-10; double squareroot( do... (by JLBorges)
Some Guidance in c++
 
Hello I'm new to c++ I have to make a program where the user will enter a staring temp, and ending temperature and an increment that will be used to advance thr...
[3 replies] Last: the problem is char "i", mostly. here is a partial fix that hopefu... (by jonnin)
Can't wrap my head around operator overloading
 
I've been provided a driver function that is supposed to demonstrate the results of operator overloading involving complex numbers. After reading up on overload...
[3 replies] Last: For your copy assignment: Complex &operator=(Complex const &c) ... (by lastchance)
String search and print
 
Please help me, The program should work in a way where when you input a word it will search the file and prints out the whole paragraph that will stop if a w...
[3 replies] Last: I dont know how to reply here for Im new but anyways thanks for the he... (by somebodyelse)
Trying to implement Priority Queue with heap
 
I am trying to implement a priority queue using a heap but i am getting an error when trying to make create a Priority Queue with the following line of code P...
[2 replies] Last: So i should pass a number to it first the max numbers in the heap an t... (by TomRyan12)
Array won't change it's values in my class' method
 
So I'm creating a game of Blackjack. Everything is done, all the logic written out and works, but for some reason the deck won't notice that a card has been tak...
[1 reply] : What is the "shoe"? You try to put and pull shoe*52 cards into the Fu... (by keskiverto)
Segmentation fault - malloc-function
 
Hi guys. I'm quite new to c++ and i tried to take a given code to let a script run. Unfortunately the script is buggy and I found out, where the error is locate...
[5 replies] Last: Thanks a lot :) Well, facing the fact i didn‘t write the whole scrip... (by zockerwurf)
Need explanation to the function isDigitIncreasing()
 
Hi guys, I succeeded in getting solution to a problem. The problem is: A number is called digit-increasing if it is equal to n + nn + nnn + ... for some digit ...
[5 replies] Last: the second factor has the form 12345... where x is the number of digit... (by jonnin)
Making a makefile for my assignment
 
I am new to using makefiles and I am currently in a datastructures class where they must be used. I am using linprog on unix. I need help making a makefile beca...
[2 replies] Last: [quote=silentwave]Wow thanks a lot for this example! I had similar pro... (by Grime)
Array values , average and standard daviation
 
Hello, im still fearly new to C++ programming. In my Advance C++ class i was given the following assignment: Write a program that will load real values from a ...
[1 reply] : Gave me no errors except for that mean was being redeclared at compute... (by Grime)
by Joo
Simulation of waiting queues of planes in an airport using double ended queue
 
Hello All, I have this Problem as an assignment : An airport has two landing runways. When planes arrive near the airport,they will have to join one queue. A ...
[8 replies] Last: Really Thanks a lot. Your comment was too helpful for me. I discussed ... (by Joo)
by KGreen
!= not working
 
Im trying to check a variable to make sure it equals a certain character but it is not working cout << "Which package are you shopping for? (enter B, S, D)?"...
[4 replies] Last: See "Comma operator" and "operator precedence" in: http://www.cplusplu... (by keskiverto)
Cython: <double[:width,:height]> what is this ?
 
Hopefully, there are some Cython programmers on this forum. My cython is a bit and rusty. I am modifying old cython code but I can't remember what <double .....
[2 replies] Last: Yes, that's correct. I finally remembered that I had found that syntax... (by CABrouwers)
How can I convert iterative insertion sort to a recursive insertion sort.
 
I've been trying to convert this iterative insertionsort to recursive but am having trouble. Here's the Original: void insertionSort() { X t...
[6 replies] Last: Well, it has been 6 days, and no further response. I said I’d post a... (by Duthomhas)
Pros of Singleton in C++
 
Dear all, I think usefulness of design pattern depends on the traits of software. Singleton is often used but to be blamed. I understand it as safer global v...
[9 replies] Last: Why call 'new' there? In the general case, the ISO CPP guide says you... (by Ganado)
February 2019 Pages: 12345... 11
  Archived months: [jan2019] [mar2019]

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