General C++ Programming - October 2011 (Page 12)

by equity
Constructors with Points and returning objects with functions, oh my!
 
Hi, I'm currently stuck on a problem involving returning an object using a function.I'm very ashamed I can't get this problem on my own, so I was wondering...
[4 replies] Last: When I see the error that you pointed out in the first post, I see an ... (by ciphermagi)
by euds
How to store different types into a single array?
 
Hi guys, i've been wondering how to store different types into a single array. For eg. cin >>: xCoordinate(int) yCoordinate(int) type(string) noOfThings...
[8 replies] Last: Make three vectors, each with their own iterator. One for the computed... (by ciphermagi)
Template Subclass
 
I am trying to create a class with a template and than subclass it like so: template<class T> class A : public D { //D is defined else where and I am subcla...
[1 reply] : Template functions have to be declared and defined in the header. Ma... (by helios)
Creating a List of Objects
 
Hello :D When creating a list of objects, how do you create new objects inside the list? Here is an example of what I am talking about: #include <list>...
[17 replies] Last: Hmm, thanks for the find ne555, I actually didn't think it had anythin... (by LoneWolf155)
by Shmeag
Caesar Cipher Code. I AM LOST
 
Okay so as the title suggest I am writing a caesar cipher. I am fully aware of what it does, but I am quite lost as to how to make it do what I want. I am not ...
[3 replies] Last: Wait so what is the question... is something malfunctioning? I would s... (by Heightened)
Need Help with SORT ing
 
#include <iostream> #include <string> #include <cstring> #include <fstream> #include <sstream> #include <cstdlib> #include <iomanip> #include <vector> #...
[1 reply] : Just a hint, you can pass the last column and row# to map<string, int>... (by EricDu)
Makefile OOP
 
This is my makefile: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Makefile for Unix & Linux Systems # # using a GNU C++ com...
[2 replies] Last: That worked perfectly. Thanks very much for your help! (by matthewmpp)
n-queens problem
 
hey yall! Im stuck, and im looking for some ideas. I want to solve the n-queen problem using a breadth first search. Plan to call the breadth search from my mai...
[2 replies] Last: I have thought about working on this problem. I was thinking about cre... (by matthewmpp)
Help meh :D
 
Hello again everyone, i came on here today to ask a question, how do i write more data to an array? if you dont know what i mean ill explain.. here i am jus...
[3 replies] Last: Like I said, either use DMA or std::vector . Either one will work, bu... (by closed account zb0S216C)
by mbede
Arguing arrays in functions//Getting output issue and can't figure the problem with my code..PLEASE_HELP.
 
I get the output: Martin's Hardware ----------------- Part No. Price Count Remaining ...
[3 replies] Last: No, I'm suggesting that you don't call main() from them. Instead, yo... (by shacktar)
Graph problem
 
Hi, I need some help in coding an algorithm for 'traveling salesman problem'. It is similar to a graph problem. I dont know how to declare vertices, edges in...
[1 reply] : There are many methods that can be used to solve the TSP. Without know... (by kev82)
Fastest Container
 
I want to hold a container with a structure containing different values of all data types. The structure has about 15 values (ranging from int to string) and th...
[8 replies] Last: My program has over 200 variables, so having a class with 200 private... (by helios)
Problem with C++ queue Display()...
 
i have a problem with my c++ coding, my program don't seem like working well. when i insert data then i wanna display it i dont show the data back.. this is th...
[no replies]
New at C++
 
Can someone help me figure out why this program isn't running? I keep getting this message: 32 error: 'N' was not declared in this scope Below is what I...
[13 replies] Last: @Framework: Considering that we're trying to answer this student's que... (by Albatross)
by teocl5
multiple definition of 'xxxx'
 
Hi all, I have been trying to build/ compile this program but i keep encountering this error message: build/Debug/GNU-Linux-x86/MissionPlan.o: In function...
[2 replies] Last: Hi athar! Thank you for the prompt reply! May I ask what u meant by i... (by teocl5)
Run C++ class functions in thread
 
I have changed the question with a simpler example to understand the problem: Suppose we have class rectangle class CRectangle { int x, y; public: voi...
[3 replies] Last: If you have no problem coding a main() function, then you should have ... (by andywestken)
by kbar
minutes seconds program
 
i am making a program that calculates the time left of an event , the problem is i cannot like the minutes with the seconds? how can i make this ? exampl...
[1 reply] : You could use time() to get the time before the event, and compare the... (by kbw)
How to replace a period ( dot ' . ' ) with a space
 
Hi everyone, I have a string that has a period at the end and i want to replace that period with a space. How do you do that? Thanks in advance
[2 replies] Last: string s="you don't care." cout<<s;//prints 'you don't care.' string ... (by buffbill)
by KKlax
Writing functions, with no break statements?
 
Hey guys! I'm a newb, so excuse my question. Alright, I think it is possible, but need some confirmation. So, here is my question: Can one write a "s...
[8 replies] Last: Done! Thanks! (by KKlax)
Function for checking opened input file
 
This is what I have done so far: //------------------------------------------------------------------------------ //Question3 //---------------------------...
[1 reply] : http://www.cplusplus.com/reference/iostream/ For your homework enjo... (by ciphermagi)
October 2011 Pages: 1... 1011121314... 36
  Archived months: [sep2011] [nov2011]

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