General C++ Programming - September 2015 (Page 5)

Quick Sort on list using Struct
 
Implement the quicksort algorithm on lists. You write one function struct listnode * sort(struct listnode * a); with struct listnode { struct lis...
[3 replies] Last: Quicksort is not typically suited to sorting linked lists; nevertheles... (by Duthomhas)
Why my program keeps giving me garbage at the same spot
 
Can someone help me check my program? I create a 1D dynamic array to emulate a 2D array and returns a pointer to the 1D dynamic array but some garbage always ap...
[5 replies] Last: Ah, @Peter87 is right - the subtle difference between round parenthese... (by LB)
I need to write a date class program
 
I need to write a date class program that checks for a string month, int day, and int year. I have tried many ways to write the program but i cant figure it out...
[3 replies] Last: I see. Are stuck on isMonthValid()? (by kbw)
SIGSEGV in list of lists
 
I'm trying to make a list of lists using a file. I read the file line by line to see if the line is a Figure ("o"), a Vertex ("v") or a Face ("F"). The list go...
[3 replies] Last: Well, it's up to you. I mean, how does your linked list work? (by kbw)
by aeck
Binary Tree
 
I am trying to create a simple binary tree. I have pasted my code below. I am getting two errors : ld: symbol(s) not found for architecture x86_64 ...
[1 reply] : Why does add() take the count as a parameter? It's a class member and ... (by dhayden)
Question about SAMP and IVMP modes
 
Hello, for those who don't know what are SAMP and IVMP those are two modes made by amateurs that make these two games multiplayer ( gta san andreas and gta 4 ...
[no replies]
by Radar
Too many arugments to function
 
#include <iostream> struct userProfile { int userNumber; std::string name; std::string address; std::string number; }; void use...
[1 reply] : I'm not too sure what this error means How many arguments you allowed... (by MiiNiPaa)
Storing pointers in a std::vector causes invalid pointers?
 
So I'm trying to store an object in one std::vector<Derived*>, and store a pointer to that object in another std::vector<Base*>. Accessing any element of the Ba...
[12 replies] Last: I don't understand why emplace_back() didn't work. Are sure you calle... (by wh1t3crayon)
Similar ascii
 
I have problem wiht my code. Arrow down key ascii is 80 and letter P is also 80 so when i press arrow key down it's cout letter P I want to fix it.
[8 replies] Last: @MiiNiPaa Thanks. (by rathpanha)
Library of Babel - Is this for realz!!???
 
I just found this mind blowing website called the library of babel. Take a look at it here: https://libraryofbabel.info/ Apparently this library contains eve...
[6 replies] Last: Hardly rational. Still, if you run out of space on pi there's always e... (by closed account 48T7M4Gy)
by Ozzy69
How define decimal places in a float in c++
 
Hi, how define decimal places in c++, because in C i know, for example: #include <iostream> #include <stdlib.h> #include <stdio.h> using namespace std; ...
[1 reply] : #include <cstdio> #include <iostream> #include <iomanip> int main() ... (by JLBorges)
Nested iterators for printing generic list of generic lists
 
Let's say I have a generic list of a class 'Figure', and inside that 'Figure' class I have a generic list of 'Vertex' and a generic list of 'Faces'. I want to ...
[4 replies] Last: #include <iostream> #include <list> struct Vertice { /* ... */ }; st... (by JLBorges)
Help with Remove();
 
I want to just make a simple file corrupter. but I can't remove the file. #include <iostream> #include <stdio.h> #include <string> using namespa...
[2 replies] Last: @coder777 I'm not sure honestly just started coding with c++. But File... (by closed account 38qG1hU5)
Infinite Loop and Outputting Incorrectly?
 
Hello! I am currently trying to write a program that will take a file, check if that file has any words surrounded by quotes(") and print out all of the charact...
[2 replies] Last: Okay. I put the comments in my original code! (by Frebadyia)
by Dkob1
Function Header?
 
How is a function header coded when the function call should allow a mix of default and required arguments? Give an example of a calls using zero, one, and t...
[3 replies] Last: Would this be okay? int mul (int ra, int rb=3, int rc=4); Yes, ... (by AbstractionAnon)
can you guys help me with this im new dont understant that much yet
 
Write a program that calculates and prints one week’s pay for an individual. Assume the person only works Monday through Friday. The person’s base pay is $...
[6 replies] Last: [quote=MassiCR7]at least tell me how to start Okay here you go. Firs... (by Vibgyor)
I am having some errors and Im still beginner level. please fix this code for me, thanks
 
Create a structure called employee that contains two members: an employee ID (type int) and the employee’s compensation (in Euros; type float). Ask the user t...
[7 replies] Last: thanks=) (by Vibgyor)
variable names and defines conflict
 
I wrote a class for my app and it contains particular variable names. For example, bool B50 . Now I need to #include termios.h to my class becasue I will use...
[4 replies] Last: LB, you simply cannot be more clear!. I understood every word. Thank y... (by ivanperino)
by yiozor
C++ Hashmap libraries
 
I'm currently researching for a project different implementations of hashmaps in c++ for benchmarking purposes. So far I found, of course, the std:: implemen...
[no replies]
Where did my program go?
 
Hey there! I just created a program on Turbo C++ IDE (Version 3.0), my bad without saving I made the program run. A function of the program contained an infini...
[no replies]
September 2015 Pages: 1... 34567... 21
  Archived months: [aug2015] [oct2015]

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