General C++ Programming - March 2019 (Page 2)

convert program
 
Can anyone teach me how to convert my code using class. #include <stdio.h> #include <iostream> #in...
[3 replies] Last: Shouldn't the inner loop increment up to width ? (by doug4)
by stav17
compiling error
 
I am writing a program trying to convert distance measurements to meters. using c++. error: Undef...
[1 reply] : I think it's just saying that your program does not have a main() func... (by Peter87)
int to int
 
Hey guys. I'm having a problem compiling my code. I'll post my code now. #include <iostream> #inc...
[7 replies] Last: Fixed: arrays have to have a size at compile time. won't do. it see... (by jonnin)
Need help with error messages "LNK2019"
 
Here is my code: #include "stdafx.h" #include <iostream> #include <cctype> #include <cstdlib> #...
[3 replies] Last: And if you didn't find the cause of the 2nd link error: displayString... (by deleted account xyzzy)
class BoxOfProduce c++
 
Your Community Supported Agriculture (CSA) farm delivers a box of fresh fruits and vegetables to you...
[3 replies] Last: Line 15: How many strings do you think you're allocating? Why is Box... (by AbstractionAnon)
OOP WITH C++
 
Write two overloaded functions that return the average of an array with the following headers: int ...
[3 replies] Last: roughly, for a vector average: for (auto n : a) avg+= n; avg/=a.size(... (by jonnin)
How can I pass value through a specialized template class?
 
Here is my problem I have an existing no-template class A, currently being used by many places. I w...
[11 replies] Last: Thank you very much, JLBorges. (by chrisben)
Help with some structures/for loops
 
I am working on a program to make a small library of the ten books I have chosen. With this program ...
[2 replies] Last: string name; cin >> name; That is formatted input that skips prefix ... (by keskiverto)
by Halken
Roman Numbers
 
I have written the following code, however, I am having issues passing part 1. #include <string> ...
[1 reply] : > I've been asked to complete the following class questions. And now ... (by salem c)
Help with converting tolower string
 
Im a beginner c++ programer and I'm trying to use an array but cannot figure out how to get it to wo...
[1 reply] : This is a “prove you have been paying attention in class and reading... (by Duthomhas)
by stav
Templated NonCopyable Singleton class ?
 
Hi i have the following code: template <typename T> class Singleton { public: static T& GetI...
[3 replies] Last: [quote=stav] i get an error on line 7 I apologize for adding a post i... (by Enoizat)
by Deamer
I have python code, I want to chang it to C++. How to di it?
 
img = cv2.imread(image_path) h, w, _ = img.shape mser = cv2.MSER_create(_min_area=100,...
[4 replies] Last: boxes = boxes[boxes[:, 2] > 10] boxes = boxes[boxes[:, 3] > 10] boxe... (by ne555)
FailCheck a Char.
 
So I'm trying to write a fail check for a char data type so that in case a user inputs a word then i...
[4 replies] Last: all 3 ideas behave slightly differently. I was going off the idea tha... (by jonnin)
by plexus
Using strings in switch statement
 
Hi, I recently had this idea of how to use strings directly in a switch statement without too muc...
[8 replies] Last: To solve your specific problem, take the easy way: an if..else if sequ... (by Duthomhas)
Going blank after input
 
Currently my program will close after I input my racer's names and time.I was wondering if anyone co...
[4 replies] Last: or, in beginner speak, conditions are explicit. the compiler does no... (by jonnin)
virtual function
 
Hi, I am learning Virtual function in c++. I read Virtual function is member function that is used ...
[2 replies] Last: how run time polymorphism(i.e;one name multiple forms) is achieved th... (by keskiverto)
not sure where the error is
 
#include <stdio.h> #include <iostream> #include <string> #include <sstream> #include <fstream> using...
[4 replies] Last: Does this version give you the same errors? #include <fstream> #incl... (by Enoizat)
Generic function pointer type
 
I am developing a class that needs to store a call back function. So it needs to include a pointer t...
[2 replies] Last: class Thing { std::function<void()> callback; public: void setCallb... (by Peter87)
Creating a class book
 
Hi, everyone I am working on this question. Booker University maintains an inventory of books. The ...
[2 replies] Last: Line 4 should not have a ; Line 8: author and title only hold a sing... (by AbstractionAnon)
Absatrct class destructors : why ?
 
If I understand well an abstract class needs to have an explicitly defined destructor, correct? At ...
[1 reply] : If I understand well an abstract class needs to have an explicitly de... (by Peter87)
March 2019 Pages: 1234... 9
  Archived months: [feb2019] [apr2019]

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