General C++ Programming - December 2012 (Page 42)

Program is not breaking out of loop. Please help
 
Hi everyone. I'm working on a program but I'm stuck on this one part that I cannot figure out. In this lab we are supposed to prompt the user for how many times...
[5 replies] Last: So I got rid of the break with 0 is entered that was on line 58. Every... (by ovaltine99)
by bleaz
Programming Program
 
What is all of your preferred programming programs? I use Dev C++ anyone else have any?
[1 reply] : This belongs more in the lounge. Also, http://cplusplus.com/articles/3... (by hamsterman)
Searching for efficient code
 
Hello everyone, In order to do some simulations, I create a class containing vectors, then a vector of objects of this class. Once it's done, I need to check v...
[10 replies] Last: Yes. I think your code get the same results as mine. but yours is shor... (by dekeenfrance)
Arrays and Inheritance
 
My question probably has a simple answer but I am not 100% sure on the syntax of replicating the following scenario. Say I have 3 classes. The first class is c...
[1 reply] : To get your code to work, you could use Animal* animal_array ; Pra... (by Cubbi)
Filling array with unique numbers?
 
This is just a piece of the code. How can I make this not use the same number repeated times? The container has 7 slots and the numbers have to be in the interv...
[14 replies] Last: @cire Now I see! THANKS mister! I finally understand! :D (by AnEvilVegetable)
hey- programming help! (I have most of it)
 
These are my instructions: (I do realize that this has been posted on this site before but my teacher did add additional parts onto the original project and th...
[no replies]
OpenGL Voxel Engine
 
So I have been making a voxel engine using sfml and the opengl that comes with it. Now what I have been aiming for at this step (Which, however easy, has confus...
[6 replies] Last: Yeah, I just figured that out, and was writing a post to say never min... (by Pickle Gunner)
Format to access a class function pointer which is a member of a struct
 
Below is my struct declaration where ticket_booking is my class. struct MENUITEM { enum ITEMTYPE type; char *name; char *helpstring; ...
[1 reply] : Read this: http://www.parashift.com/c++-faq/pointers-to-members.html ... (by vince1027)
by Hucaru
SFML Window title
 
Hey, I have managed to get a window open using SFML. However when I set the title of the window it is not displayed correctly. Here is my class: class Ga...
[2 replies] Last: Thanks that worked. Had no idea that there was much of a difference be... (by Hucaru)
by ekolet
How to open a file from a spesific directory
 
First I want to open a text file and save some data in it. 1)ofstream out; out.open("C:\\output1.txt"); <= this does not work, it works fine if i try to ope...
[13 replies] Last: I think ShellExecute() could be much better choice if you want to exec... (by modoran)
by Untrue
Sorting characters in an ADT List
 
If the given list is 'a' 'c' 'd' 'e' then the user inputs 'b' @ position 3 (assume position-1) then it should sort to 'a' 'b' 'c' 'd' 'e' ignoring the position....
[1 reply] : God I need to sleep. You also need to improve your otherwise atroci... (by Catfish3)
Problem in my programme
 
Well, so I'm writing a program that will 'interrogate' words (pardon my imperfect English) for school. So most of the program is working, but somehow when you'...
[1 reply] : There's really not enough here to see a problem. Can you post complet... (by AbstractionAnon)
by Ali93
Error in Copy Constructor(stack)
 
HI This is a Copy Constructor function, using stack when i run this function,(other functions run okay)the program stop working. I revise the function seve...
[1 reply] : At line 9 of the copy constructor, you're going beyond the bounds of t... (by AbstractionAnon)
by Copy
Any recommendations?
 
Well, I just finished "Basics of C++" and it was a five lesson tutorial ( one of many), and I was wondering if you could give me ideas of what programs I could ...
[2 replies] Last: I used jumping into c++, it teaches you a concept, then shows you how ... (by Pickle Gunner)
public inheritance and mixin style
 
I read Scott Meyers Effective C++ book and I cant understand why did he use public inheritance in Item 49 (when using mixin-style base class) template<typen...
[no replies]
Passing one row from a multidimensional array into a function .
 
So I have a multidimensional array like this , N is any integer value double arrayDistances [N+1]; every row of the multidimensional array consists of ...
[2 replies] Last: Thanks, I figured this way out , double largestFromEach ; f... (by nishantve1)
Developing FIFO queue, need something better than time(NULL)
 
So per the title, I'm developing a FIFO queue (well more also but I just found the problem), and I've realized that time(NULL) is actually not accurate enough f...
[7 replies] Last: Or simply clock() for c++98 By the way, time() and clock() meas... (by ne555)
STL issues.. (again)..
 
I don't understand .. why do I keep getting vector subscript errors even after using vector::clear() and vector::resize(size_type n) ? Here is my code: #...
[no replies]
Need help Getting Map to center around character.
 
//yes i know system commands are evil, and i only used it for the sake of showing //my code on the forums in 1 file, got my own clearscreen function. I need h...
[18 replies] Last: Thanks for the help, it worked perfectly :) (by brandonator)
by LB
Bad design? So what's the solution? (1,2,3)
 
I've seen an overwhelming consensus that if you need to know the type of an object at runtime to downcast it and deal with it differently, that there is somethi...
[45 replies] Last: Ok, I was trying to avoid over explaining things to someone who knows ... (by TheIdeasMan)
December 2012 Pages: 1... 40414243
  Archived months: [nov2012] [jan2013]

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