General C++ Programming - March 2016 (Page 9)

Polynomial Exercise
 
Exercise from book pdf http://docdro.id/nrdKYMh poly.h #pragma once #include <iostream> #define MAX_DEGREE 20+1+1 class Polynomial { private: ...
[no replies]
Enum types and classes
 
I can't seem to understand how to fill an array made in class A with an enumerator type made in class B and these two classes are separate files. I know some s...
[5 replies] Last: Good: class B { public : enum colour_t { Blue, Red, Green, Orang... (by JLBorges)
PowerSet Function
 
I have a program which has to find the longest non-decreasing order sub sequence in a given array using a powerSet algorithm The algorithm compiles fine, bu...
[no replies]
Boolean in Function (Menu Program)
 
My professor seriously threw too much at us over spring break... Anyway, I have to create a boolean function that checks rather or not the values entered by the...
[3 replies] Last: @Thomas1965 I tried your code and it works! Thanks a ton. it can be ... (by mikepann83)
switch question
 
Below what do I add to my switch statements to code "for all the rest that are not listed"(sic). I have conditions for D, d, H, h no prob. But H and h will rep...
[11 replies] Last: In my IDE's editor , I never need to use the tab key - it does indenti... (by TheIdeasMan)
by mkb555
Deleting a trie
 
There's plenty of help online for how to delete an entire binary search tree, but none for deleting a trie. I understand how to do it when all you have is a lef...
[3 replies] Last: I understand how to do it when all you have is a left and a right nod... (by cire)
Enum and Struct Program Help
 
Write a program that will manage a simple address book. The program should allow you to view and search existing entires as well as add new entries. The data s...
[1 reply] : struct Person{ string firstname; string lastname; int phonenumber; }... (by mike9407)
need help with Grocery Item class and functions
 
Hello I'm running into some issues with my grocery store program. The class GroceryItem is supposed to define private values to hold information about the Groce...
[1 reply] : > while (!(stock >= 1000 || stock <= 9999)) tell me one number that ... (by ne555)
Windows Forms, SerialPort
 
Hello I need to read 13 bytes useing Serial Port. Only funcion that i think can do this is "Read(..)" https://msdn.microsoft.com/pl-pl/library/34t733fh%28v=vs.1...
[2 replies] Last: yep, it works. i got it few minutes ago ^^ (by JelloneKXX)
need help
 
guys do u know whats wrong with this code? the final answer is incorrect. #include<stdio.h> int main() { int a,b,c,d,e; printf("Enter a number: "); ...
[1 reply] : One post only, please. http://www.cplusplus.com/forum/beginner/187091... (by Moschops)
detecting enter key with vectors
 
#include <iostream> #include <iomanip> // let's start using "manipulator" for output formatting! #include <vector> using namespace std; vector<string> s...
[2 replies] Last: it does work. but i want to know how should i get the last word of the... (by riyadhhossain01)
Working with labels in OpenMP: How to or is it possible to jump in Threads?
 
I am trying to get some code paralleled, and algorithm must be remained. Here is the original Code: #include <stdio.h> #define N 50 main() { int prime ; int ...
[2 replies] Last: Sorry about the edit. I tried to edit as fast as I can once I post the... (by istemihan)
Code Blocks IDE: can i add a DLL to a project?
 
can i add DLL's to a project?
[no replies]
need help understanding extracting from file and loading into array.
 
This what i have so far i have hard time understanding extract and even less luck with understanding how to turn the extract info into an array to be sear...
[2 replies] Last: i have the file printing on seperate lines for each set of studentid, ... (by ekincaid2002)
Prime Number Program Optimization
 
Hi guys! Today I wrote a program that finds the first 'n' prime numbers and I saw that when 'n' gets bigger, the necessary time for the program to run increases...
[2 replies] Last: A quick update: I found that if I replace for(int j = 2; j <= prime ... (by Liviu13)
Need some help
 
Could somebody make the function which will do following: First parameter(argument) is string ,second parameter is vector which containts list of phrases which...
[1 reply] : I just made it a bit more readable. using namespace std; string Fun... (by Liviu13)
C++ Cable bill calculation
 
I am doing something wrong within my code. I'm pretty sure I did not declare the letters right, I'm not sure how that is done. I'm sure other things are wrong ...
[8 replies] Last: Here is your code reformatted and with the compilation errors fixed. ... (by dhayden)
Migrate existing Dev-C++ project to Visual Studio 2015
 
Hello. I have this project of a game made with Dev-C++ 4.9.9.2. Since Dev-C++ is way too old and harder for me to program on i have decided to migrate the proje...
[2 replies] Last: Thanks for the answer @Chervil, but the fact that DevC++ is outdated i... (by Edelweise)
dynamic array vs array given the size at run time
 
Hello all , As many of you know that GCC compiler let you give a size of an array during a run time. However, that made some conflict with dynamically allocated...
[3 replies] Last: Yes. Pretty much always. The heap is only limited by the amount of mem... (by helios)
How to check for shallow copy?
 
I know that c2 is shallow copied into c3. But how to show that to audience that it is a shallow copy rather than deep copy. I know i can't use delete to de...
[4 replies] Last: Shallow copy and deep copy are different for pointers. With a shallow... (by dhayden)
March 2016 Pages: 1... 7891011... 23
  Archived months: [feb2016] [apr2016]

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