Beginners - May 2017 (Page 24)

Classes
 
I am having issues with this program. I have to use a constrictor TallyCounter::TallyCounter(), to initialize the tally to 0. Then I have to write a program, f...
[15 replies] Last: I appreciate all the help you guys have given. I've never seen that ct... (by kirby3422)
Comma delimited fields to a map.
 
I have a plain text file in the following format: aaaa,bbbb cccc,dddd Is there any way to input aaaa as the key and bbbb as the value into a std...
[10 replies] Last: further details here if you're interested: http://en.cppreference.com/... (by gunnerfunner)
function problem
 
Why the result is wrong?when i enter 4 and 5 for square. the square answer is 0.0. #include <stdio.h> #include <math.h> double calcSquareArea (double widt...
[5 replies] Last: Thnx . you are right. lf not f. (by teopeishen)
Derived objects in base class containers
 
I have heard, that's problematic if a container is instantiated with a base class type and will get filled with derived class types. Because their size is diffe...
[2 replies] Last: Your container holds pointers, so the size discussion is not relevant ... (by Cubbi)
by tjb
Accessing array in loop
 
As I'm new in CPP it might be an easy question or not. However, I try to access an array of int but get a different result before and within a loop. Could any b...
[6 replies] Last: Sure: class OpenCV_Func { public: static void AutocropCany(cv:... (by tjb)
alphabetical order and object orienting
 
I need to add the following things to my program i already have finished. • Keep the inventory in alphabetical order. When a new entry is to be added, put...
[2 replies] Last: 8:9: error: 'std::string Entry::name' is private 25:29: error: withi... (by wildblue)
How to draw a shape into an internal form Qt
 
Hello! I have to draw a shape into an internal frame, but I only found some tutorials to draw shapes on the entire frame. I hope I have made me understand, if n...
[no replies]
Calculator shut down
 
I am new to c++. I made a calculator and i "build and run" it and it worked perfectly. then I tried to run the program that was created by the compiler and when...
[6 replies] Last: @keinrich Tip: If you used std::cin or std::getline() one or ... (by boost lexical cast)
by Boidoh
Overloading Operators
 
I found this code online that overloads the multiplication operator using a fraction class. I have finals coming up and I'm trying to grasp the concept. Can any...
[2 replies] Last: I think you know how the arithmetic of fractions is implemented. But, ... (by boost lexical cast)
COUNT OF PRIME NUMBERS
 
#include<iostream> using namespace std; main() { int min,max,i,flag,count=0; cout<<"Enter Min Value: "<<endl; cin>>m...
[1 reply] : #include <iostream> #include <cmath> int main(int /* argc */, char*... (by boost lexical cast)
Planning on making my own version of DOS
 
Howdy everyone, I've been dreaming of this for quite sometime. As the title says, I'm trying to write my own DOS, now just the basic run of the mill DOS you'd f...
[1 reply] : Go for it. Its a more complex OS than you think, though. You have to... (by jonnin)
Need a faster (more efficient) program
 
Write a program that, given a sequence of words, computes how many characters have in total the words that appear once, how many characters have in total the wo...
[18 replies] Last: Sorry about that. Ive done it with my own, but never standard headers... (by jonnin)
Send The User Back
 
Team, I am trying to get this right in my head - but I can't get it to resolve. Basically - This is what I need to do. I have no problem repeating an EN...
[1 reply] : #include <iostream> int main() { bool fQuit {false}; while... (by gunnerfunner)
Question with linear sort, bubble sort, and selection
 
Write a complete C++ program to read in, sort, and perform other statistical actions on a set of data. The program will read from an input file and write all re...
[1 reply] : Given it's homework I suppose you have no option but to maintain separ... (by gunnerfunner)
Question about classes
 
I've gotten used to writing all the classes in the main but I also learned that you can create new class and headers. That is where I become confused. This is w...
[2 replies] Last: Also: Prefer double rather than float. The latter looses precision ... (by TheIdeasMan)
Code won't write to file.
 
It creates the .txt file but it doesn't write to it. void findLists () { if (CreateDirectoryA ("ToDoLists", NULL)) { //Directory created } e...
[3 replies] Last: void createList () { std::cout << "Enter a file Name, Example - ... (by JLBorges)
Converting a function to an operator
 
How to convert the function of combining two sets into a class operator? #include <iostream> #include <vector> #include <algorithm> using namespace std...
[2 replies] Last: updated the operator + overload to support concatenation: #include <... (by gunnerfunner)
Send to one of multiple clients Winsock
 
My server accepts multiple clients and sends the respective "Hello" with their client number but my question is how would I be able to type like 3 in my server ...
[no replies]
May 2017 Pages: 1... 222324
  Archived months: [apr2017] [jun2017]

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