General C++ Programming - April 2016 (Page 3)

by jona
How to create a programme that will convert decimal to binary.
 
Hello,I'm a student who is a beginner in c++ programming. I was asked to create a programme that will convert decimal to binary without using any arrays. I was ...
[1 reply] : you want to divide the decimal number by 2 while writing down the rema... (by haglerchristopher)
parallel arrays , sorting alphabetically
 
How can this code sort a phone number list by name alphabetically(comparing last names, then if last names are the same, first names? #include <iostream...
[no replies]
by ToT
c++ memory leak problem...HELP..~~~
 
when I run it always appear, it stops work.... I don't know why, my classmate said it is about the memory leak problem, but he also don't know how to fix it. ...
[1 reply] : 1. expensive has no user-defined destructor, so all pointers it has al... (by helios)
Please help me with my assignment. [Arrays]
 
Write a program called Payroll.cpp that asks for the number of hours worked by any number of employees and calculate the average hours these employees worked. ...
[3 replies] Last: If you show us your code, we can help you fix your problem. (by MikeyBoy)
undefined reference overloading function
 
Working with overloaded functions I get the following error (at bottom): I've been working with it extensively don't understand it. #include<iostream> struc...
[2 replies] Last: got it, thx Below is a simple program to demonstrate some overloading... (by technologist)
Calculate surrounding mines Using 2D vector
 
I am creating a minesweeper game as a class project. #include <iostream> #include <cstdlib> #include <vector> #include <fstream> void setupGameBoard();...
[no replies]
Arrays, Vectors, & Pointers
 
The following program allows the user to enter a list of names (ending this process by entering -1) and then the user enters the best friend of each person. The...
[1 reply] : I forgot to also include the .h file and the other .cpp file this is ... (by therpgking)
Typename and tracking down a LNK2019 error
 
I have the following code: #ifndef CONNECTIONMANAGER_H #define CONNECTIONMANAGER_H #include <list> #include <iostream> #include "ThreadLib.h" #include "Sock...
[9 replies] Last: Missing ThreadLibMutex.h also, you are missing some includes, like cm... (by ne555)
..Extern Template in .h file
 
This question has been asked around the web but I'm struggling to understand the replies.. In my .cpp file I have the below. Template<class myvar> ...
[9 replies] Last: That's not what the report button is for. Not every answer that doesn'... (by helios)
resize(cds) in createCDs function was not declared
 
//the error points to cds /* */ #include "CDs.h" #include <iostream> #include <string> #include <cstring> #include <fstream> using namespace s...
[1 reply] : If you want to use the function resize(...) you need at least a protot... (by coder777)
quick q: double stripped to int?
 
When I pass 3.0 & 4.0 from calc in main, I expect to see double values inside the function, which are not. The values of 4 and 3 are also returned. Why are the ...
[2 replies] Last: Thx working now~ (by technologist)
findCDs function help
 
in the first file how would the findCDs function be written correctly? it's supposed to check what the user typed in with the cds stored. If the user typed in...
[1 reply] : Firstly, please stop spamming the forum with multiple threads for the ... (by MikeyBoy)
Call another classes member function or saved it in this class?
 
Hi everyone. I have a class B that needs to take information stored on another class A and use it times and times again. The two way I thought of doing it was h...
[2 replies] Last: @keskiverto, I have a class A that only has number of row, column and ... (by codebusters)
FLTK setup problem
 
In my cmd if i write gcc -v it shows me gcc version 5.0.3 but if i write the same thing in MinGW shell it shows me gcc version 3.4.4. For this problem i cannot ...
[1 reply] : When you set up MinGW you probably set up your paths differently to yo... (by MrHutch)
by k1135
Need help Compiling
 
Hi im not sure what im doing wrong. I have a project due and cant figure out what the bug is. Its suppose to be a simple linked list project with the basic [...
[3 replies] Last: Your title says that you need help compiling. I assume by this, you m... (by MikeyBoy)
Unresolved External symbol
 
why am I getting these two error codes: error LNK2019: unresolved external symbol "double __cdecl getArea(double,double)" (?getArea@@YANNN@Z) referenced in f...
[5 replies] Last: never mind finally caught it just saw the A..... thank you (by FranciscoDiaz)
by ct180
Dynamic line reading input
 
I have a program that reads from lines in a text file and saves the space delimited strings and characters to 3 variables. For instance: ifstream fin(argv...
[4 replies] Last: You need a parser! Programming a parser is complicate and using regula... (by closed account 48bpfSEw)
CD input file library
 
NEED HELP WITH CDs FUNCTION /* */ #include "CDs.h" #include <iostream> #include <string> #include <cstring> #include <fstream> using namespace s...
[no replies]
Arrays for c++ program.
 
Hey guys, I had a homework on my programming class, but I am having a lot of difficulty with it. The project is: A small market maintains an inventory of exa...
[1 reply] : Duplicated post: http://www.cplusplus.com/forum/beginner/189876/ (by chicofeo)
April 2016 Pages: 12345... 23
  Archived months: [mar2016] [may2016]

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