General C++ Programming - April 2015 (Page 20)

by anup30
qsort() 2d dynamic array
 
ascending sort. rows wont be sorted internally. comparison of row n and row m: if row < row row...
[1 reply] : solved. // #include <iostream> #include <cstdlib> // qsort using nam... (by anup30)
Source-based or binary-based library?
 
Hello, I currently working on a general library and I'm wondering if I should distribute it to be us...
[2 replies] Last: Thanks for the fast reply, all the headers are include guarded. So the... (by Cube777)
sprintf outputting a char array
 
In my class we have a server and a client and we send information between the two. For this program ...
[6 replies] Last: With that few lines of code it's rather a guessing game... You send s... (by coder777)
Shallow and Deep copy constructors
 
Hi, I'm having trouble writing a shallow and deep constructor for 2 arrays that demonstrate the diff...
[7 replies] Last: No, that would be a deep copy You would simply do myShallowCopyArray ... (by ne555)
Need help with main function.
 
Basically my whole program is comprised of 2 class definitions in header files along with the cpp fi...
[4 replies] Last: You should put your code in code tags! int main() { //Readable! ... (by Mats)
Quick C++ stack vs heap memory
 
In the following scenario: class SubObject { public: list<string> myStringList; ...
[2 replies] Last: I added the output statement to the constructor. It does get called. ... (by Aztecs1)
by Mbk
formatting C++ Calendar Program
 
Need help! I'm trying to figure out how to print the first day in the right day of the month #inc...
[2 replies] Last: yeah but I've tried everything but I don't how to put the first day on... (by Mbk)
Sprintf only sending last message.
 
I have two programs, one is a server and one is a client. It is a game of jackblack that is played o...
[1 reply] : Bump (by Westonrwright)
pseudo-code
 
Having trouble reading this simple pseudo code to insert into a function. The topic of this code is ...
[3 replies] Last: You've never followed cookbook instructions before? You've never even ... (by LB)
Parking Deck Simulator
 
Hey guys! Below is a program that I coded that is meant to simulate a parking meter within a parking...
[5 replies] Last: Yes change it to int. Also, I dont quite understand the if statement i... (by TarikNeaj)
Need a little help with class
 
Here is a single step for part of my homework. equaltdate is a function I have to implement into my ...
[1 reply] : 1) Your getName() function returns an int instead of a string. 2) your... (by Texan40)
c++ calendar
 
I am having trouble coming up with source code for this :( Speci fications: 1. Calendar is menu-dr...
[1 reply] : Please do not double post - http://www.cplusplus.com/forum/beginner/16... (by TarikNeaj)
help with structure
 
Hi everyone! I don't know how to do that. I have a task to do for school This is structure: ...
[1 reply] : http://www.cplusplus.com/doc/tutorial/structures/ https://www.youtube... (by TarikNeaj)
by Dkob1
How to make straight?
 
Ages are not straight, how to fix? #include <iostream> #include <string> #include <iomanip> ...
[10 replies] Last: Oh I didn't knew that... Thanxx @ keskiverto . PS: I a a newbie and I ... (by shadder)
Why is my program writing to the same line in .dat file
 
I am creating a library Management system. The system is meant write and read from a .dat file. Howe...
[1 reply] : However the system is having problem writing the user input into the ... (by coder777)
Best way to provide access to objects in multiple layers of parent classes.
 
Ok, this may not be the best title but let me explain what I mean: I have multiple classes, somethi...
[4 replies] Last: But how would the player class add its sprite to the GameStates render... (by Horscht)
traffic light
 
Im Getting a but load of errors I have to make a traffic light. Im thinking I have things mixed arou...
[3 replies] Last: I see the draw rect as a private function of the TrafficLight class; i... (by LaboPie)
by Matep
Algorithm Complexity problem
 
The task is to find the shortest way from me ('S') to the hut('D') without touching the flood ('*') ...
[1 reply] : Breadth first search A star Dijkstra These are all names of algorithm... (by Smac89)
Sorting 2D Arrays
 
Sorry Im new in this forum. I have an assignment due tonight that I have display student ID's and gr...
[1 reply] : Don't make unnecessary function arguments. I would put all the code i... (by poteto)
is this code valid ?
 
#include<iostream> using namespace std; int readHours() { int sumhours=0; while(hours!=-99) sumhours...
[1 reply] : at a glance it looks like you will be in an infinite loop if you call ... (by Westonrwright)
April 2015 Pages: 1... 1819202122... 28
  Archived months: [mar2015] [may2015]

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