General C++ Programming - April 2011 (Page 2)

creating array with size determined by user input?
 
So in MATLAB, I can create a matrix with a size determined by the user input, such as below: T=input('Number of data points for time variable? '); N = input('...
[8 replies] Last: If I'm not mistaken, the n and t in Abramus and webJose's suggestions ... (by helasraizam)
by Zap
Structure as part of a class?
 
can you have a structure as part of a class? inside my class i am working with two parallel arrays, so it would be better if i could have that data as a stru...
[2 replies] Last: ok thanks! (by Zap)
small problem in OpenGL
 
So I've run into this problem when trying to make things in openGl, quite constantly; the problem is the screen not updating. I'm trying to create a command-inp...
[2 replies] Last: Call at your display function. What interface are you using? (glut, SF... (by ne555)
copy constructor (1,2)
 
Lets say you have an abstract class of such: class vehicle { //abstract class }; class car:vehicle { //does whatever } class bike:vehicle { //does whatever }...
[28 replies] Last: in the contructor... 'this' is the object being constructed. so if yo... (by Disch)
by Kady
Array
 
I am in a C++ programming class, but I am completely lost when it comes to compiling and executing programs, please help! Write a program that declares an ar...
[1 reply] : Please make only one thread: http://www.cplusplus.com/forum/beginner/4... (by LB)
Hi! First C++ Program. Trying to get it to work.
 
Hi guys. This is my first c++ homework assignment. I am familiar with c, but am having a hard time getting this to run: #include <iostream> #include <string...
[3 replies] Last: You define a function the same way as always. But in this case you may... (by LB)
Visual C++ Express's Unhelpful Error Message
 
#include <iostream> using std::cout; using std::cin; using std::endl; int main( ) { int Base( 10 ); int *Target( &Base ); int *...
[10 replies] Last: Tried it in MINGW compiler and it is happy with both int **Pointer( ... (by guestgulkan)
by yoyeen
your own software in C++ with Qt
 
hi. anyone who has built his own software using C++ with Qt? One that you did on your own, not in a team, and just did it because you liked doing it. Or maybe y...
[13 replies] Last: On that site it states that for the LGPL version of QT you must provid... (by closed account 1yR4jE8b)
Parallel vectors (may be) (1,2)
 
a
[25 replies] Last: http://www.cplusplus.com/forum/general/41941/ Seems similar enough to... (by LB)
loop only execute once
 
hi, i wrote the main() for testing my game, but the while only execute once, it should keep looping until one player has no card on the container. Can any body...
[3 replies] Last: i just delete the line 73, but shows in infinitely loop how can i fix... (by keithzhou)
got problem with my code
 
hi, I'm writing a Card war Game. but i got problem when i try to compile the main function. Here is my Code: card.cpp #include<iostream> #include<vector...
[4 replies] Last: i just try that. but still infinitely loop. (by keithzhou)
Vowel Guessing game
 
Basically what i have here is a guessing game that allows a user to input a number and letter. Its pretty basic. I have done the easy part for the Number game a...
[1 reply] : The first step to solving a problem is having readable code. I have fo... (by LB)
dll question
 
I searched the forum trying to find an answer that might alleviate a post, but didn't find one that appeared similar. I am somewhat of a newbie to C++. I am try...
[no replies]
by RDJ
Read in char from string
 
HI, I am trying to read in each individual character from a text file using the fstream library. I am getting a stack overflow error when i debug using the IDE...
[7 replies] Last: Thank you for all of your help. I will try your recommendation of mak... (by RDJ)
A Question about gui
 
Hello. I am a beginner of programming, i have programmed a program using "win32 project" and i need to change my program interface, is there any hope i can do t...
[1 reply] : I think that "windows form application" is using NET. I found that thi... (by savavampir)
Shortest path approach
 
Hi, I am developing an application that finds the shortest path between 2 nodes on a graph. The problem is that graph has about 100 nodes, and each node has ...
[3 replies] Last: [quote=williaml]a network with 100 nodes has a high chance of being NP... (by naraku9333)
User Defined Array Size
 
I can't seem to get right is the procedure to get a value for array size from user. Any help?
[1 reply] : Use a vector http://www.cplusplus.com/reference/stl/vector/ (by Bazzy)
Interface based programming in C++
 
I am having problems with interface based programming. I have recently found out that stl containers cannot store abstract classes ( eg. vector<ISystem> ). I co...
[no replies]
simple lexxer problem
 
Hey guys, This program works just fine as long as the source code uses spaces to separate the state types. Input file... 10 rem 12 input x,y2 13 if x ...
[4 replies] Last: You are posting too much code for someone to help you. Try to determi... (by abellia)
by derata
calculate the entropy using the binary tree
 
Hi, I programmed a program to calculate the entropy. So far I have done reading test.txt from the command line. But now I do not know how to save words from tes...
[no replies]
April 2011 Pages: 1234... 37
  Archived months: [mar2011] [may2011]

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