General C++ Programming - February 2016 (Page 19)

Problem With Bubble Sort Algorithm
 
I have to bubble sort program for an exercise on Learnccp.com. I'm doing it on Visual Studio Community 2015. When I tried to run the code, it crashed on with ...
[7 replies] Last: Just tell me how to use that correctly, then, in case I want to retur... (by Chervil)
realloc
 
Hi there! I have seen some examples of realloc. Most of them use two pointers, the first one to be passed as a parameter to realloc an the second one to save...
[1 reply] : > Is there any problem to use only one pointer? If there is not enou... (by JLBorges)
Timer for a game in C++
 
Hello, my name is Gabriel and I'm a new member on this website As you may have already noticed, I'm working on a game in C++. The game is based on the first ...
[8 replies] Last: @Computergeek01 Thank you for those coding lines! I'll adapt them to m... (by kavalaoficial06)
Derived Virtual Function Declaration
 
Is it possible to define the inhertied virtual functions outside the derived class definition using '::' operator? class outline { protected: virtual void...
[6 replies] Last: If the functions are virtual and I inherit them, wouldn't they save t... (by TheIdeasMan)
trying to parse a line
 
I'm trying to make a really basic parser that will allow the user to enter in a string and will be able to search it for math problems. (ie 5+5)the main problem...
[4 replies] Last: That makes more sense thank you. However I'm still unsure if I should ... (by CrypticA1)
Compiler size issue
 
Hey guys im kind of a rookie in this sort of thing but umm, gotta question for ya, can u help me by telling me how to literally increase a size of the compiler,...
[3 replies] Last: So what platform are you using? We can answer your question but we nee... (by Computergeek01)
by boev
Help with saving the data in the array
 
Hello, I have a project to make array, and I want to save the input data when is enter, so you don't need to enter it again. I made option N7 to save my data...
[2 replies] Last: Thanks! :) (by boev)
Loading class data from one class into another
 
Say I have class A and class B. A needs to load class data from B into its own variables. I know I could create a function in A that just calls each of B's ...
[1 reply] : [quote=OP]A needs to load class data from B into its own variables. ... (by Computergeek01)
Not sure why this Vector find will not work
 
Can i get some Help with this..Not sure I have tried different data types still not working int index; //char test; did not work //string result; di...
[4 replies] Last: thanks it works now (by nameishi)
Traverse Indexed Object using Pointer Math
 
I am experiencing memory leaks using pointer math to traverse my indexed heap. What is the best way to calculate object size and move from one index to another...
[8 replies] Last: If you want nodedist to be set to the size of a node: nodedist = s... (by cire)
shared buffers as a single linked list
 
Hi I am facing to a design issue related to shared buffer management with shared_ptr. To summarize, the class below displays thi idea. #include <memory> ...
[1 reply] : private: SharedBuffer* next; // use a pointer directly, or better... (by kbw)
Virtual Destructors logic in inheritance (1,2)
 
Hello. This is my draft: class Base { public: Base() {} virtual ~Base() { cout << "Base destructor called" << endl; } }; class Derived : public Base { pu...
[20 replies] Last: Thanks very much. I now have clear ideas =) (by gedamial)
graphics.h help
 
I have to plot a line equation in c++.. how to do it? i have already drawn the co ordinate axes using the line() function but im unable to move on.. for eg: ...
[no replies]
g++ works in my machine but not work on another machine
 
I use the following command and am able to generate the execution file g++ -o T201_UniformFilm -std=c++11 -I ~/Work/PhD/Runs/Eigen324 -O3 T201_UniformFilm.c...
[3 replies] Last: Those are link errors. Are all those undefined references to symbols ... (by MikeyBoy)
Function overloading
 
PLEASE HELP !! Question is a restaurant provides its customers a membership card option that gives them discount on meals. Three membership cards with differ...
[3 replies] Last: 1) Please use code tags when posting code, to make it readable: http... (by MikeyBoy)
by MrPain
Easier solution for nested "for loops"?
 
So here is simple program that checks every password with 4 characters, it starts with aaaa,aaab,aaac,aaad....aaba,aaca,aada.... and so on. To check for every o...
[2 replies] Last: I'm gonna analyse this a little bit but thanks man that should be it. ... (by MrPain)
C++ static library codeblocks
 
I've decided to split my project that I was working on into smaller libraries, each of which will link into the final project. However when I open codeblocks an...
[6 replies] Last: No worries :+) Actually it's worth reading the compiler manual, there... (by TheIdeasMan)
Not able to figure out this parameterized constructor.
 
#include <iostream> #include <stdlib.h> using namespace std; class rational { int num, den, num1, den1, num2, den2; public: rational() { ...
[2 replies] Last: Hi, figured it out. I wonder about that .... :+) It's just that ... (by TheIdeasMan)
Better way for combination and permutation Vector?
 
I found this code, here: http://stackoverflow.com/questions/12991758/creating-all-possible-k-combinations-of-n-items-in-c on line 11 I am getting an error sayi...
[7 replies] Last: If i wanted to test each permutation, by calling another method. Wou... (by nameishi)
Hi-Lo Game Problem
 
I'm having trouble with this game; the random number picked by the computer constantly changes during the same run of the game. #include <iostream> #includ...
[2 replies] Last: Yes, your loop is calling the random number generator every single ite... (by RUNNER PRO AGARIO)
February 2016 Pages: 1... 1718192021
  Archived months: [jan2016] [mar2016]

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