General C++ Programming - February 2013 (Page 7)

by cob
Program crashes... cin.get() not... cin.getting
 
It's a simple dictionary, to work with pointer arrays a little. The program is supposed to tell the ...
[4 replies] Last: ahh... so then limiting the size is a separate task altogether! I must... (by cob)
Managed memory, what do I return?
 
I'm using std::shared_ptr to manage my memory, but I'm no longer sure what to return, I don't like a...
[no replies]
Template for a Stack?
 
Ok, Im editing this post.. I got a template to work, just confused as to the isFull and isEmpty func...
[6 replies] Last: Your absolutely right.. I just realized I was using () instead of [ ] ... (by jjroyale)
Dynamically allocated array help
 
I am having some trouble on understanding how to create a dynamically allocated array and then input...
[1 reply] : char *array; array = new char ; (by Smac89)
Conversion from Pdf to text file
 
Hi, I have this project for my college work but i'm not getting any single idea and with that I'm a...
[5 replies] Last: That code was compiling but the output i got was a blank text file. Wh... (by points2008)
Random number generator problems
 
I am working on a console version of the dice game pig. So there are two players, the computer and y...
[6 replies] Last: The part of the code that alters continuePlay is only performed once... (by noobletplusplus)
Unsigned int or size_t?
 
Hi, I know that to run a for loop we can use int to control like for(int i=0; i<x; i++) . But wh...
[8 replies] Last: All objects created on the stack are destructed at the end of their sc... (by LB)
Function Overloading
 
Hello we got the following assignment:  Declare a member function speak() for each of the class...
[3 replies] Last: class Dog { public: string name; public: void speak() const { ... (by vlad from moscow)
Function pointers vs subclasses
 
Hi Guys, I am in a position to choose between function pointers and subclassed objects. To make i...
[6 replies] Last: Are there C++ libraries that aren't templated on callback type? Even A... (by Cubbi)
Threading Static Templated Member Function In Template Class
 
I'm kinda stuck on this. #include <iostream> #include <thread> template <int A> struct X { t...
[no replies]
RandomRiddle
 
I have started writing a c++ code in which I must keep the program alive until the user ends it. I m...
[1 reply] : Uhh, what next? Well you said you need vector and random, put them i... (by yelnatz)
by rajiv1
Error LNK 2019 with VS 2005
 
My humble greetings to everyone. First of all, I would like to present myself. I am a student and I ...
[no replies]
Reading text file
 
I'm trying to arrange names alphabetically from a textfile. Inside my textfile, it's like : "John", ...
[2 replies] Last: Woah, thank you so much! :))) (by polkodot)
Can you help me ???
 
This code is show all the composite numbers1 to 100. how can i add a limit of 5 column in this sampl...
[1 reply] : Just use a counter in there. if( (count++ % 5) == 0 ) cout << endl;... (by yelnatz)
Variadic Templates
 
I'm looking for a way to enter an unlimited amount of types in the <> part of a template function, I...
[2 replies] Last: Thanks :] (by Zephilinox)
Can someone help with O(N^2) questions, shed some light on them.
 
I need help with these, and don't quite understand. Can someone please help shed some light. 1) ...
[8 replies] Last: For 1, I don't think it wouldn't take half the time, it would take a q... (by Zephilinox)
Basic question but need a solution
 
Hi, I have to create and use a lot of vectors like vector<double> vage_1; vector<double> vage_2;...
[2 replies] Last: Create an array of vectors, use the subscript to access the vector you... (by TheIdeasMan)
Time complexity in STL
 
while adding ,removing and updating (at first/last/in between) data in vector, list or in simple arr...
[2 replies] Last: Linked list: O(1) -> No defference for first, last or between For "b... (by Peter87)
game of life
 
#include<iostream> #include<cstring> #include <iomanip> #include <cstdlib> //dear all i dont kno...
[no replies]
Retrieve from Hash Table HELP!
 
Hey guys, I'm trying to retrieve the Player object from my hash table so I can edit the content o...
[3 replies] Last: This is more a data structures issue than a C++ coding issue. Once yo... (by kbw)
February 2013 Pages: 1... 56789... 43
  Archived months: [jan2013] [mar2013]

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