Beginners - May 2009 (Page 17)

by bidi
Inheriting from a template
 
I'm trying to inherit methods that return the object but I'm having some problems understanding how to do so. After doing some extensive search (at least it fe...
[1 reply] : What you want to do is what casting is for. Templates do not help you... (by Disch)
by MNRA
Dynamic programming solutin
 
hello everyone,,, i have a question regarding a part of my code,,,,i don't understand y I don't get the correct answer in my output,,please help me :) I...
[1 reply] : What? Dynamic programming? This is just a recursive formula. http://e... (by helios)
dynamic arrays
 
I have array of pointers which points to arrays. int *point_to,*temp; point_to=(int*)malloc(sizeof(int*)*5); temp=(int)malloc(sizeof(int)*6); point_to =&...
[2 replies] Last: of course! thanks helios (by sigutis)
by Lorena
Slowing down the console...?
 
Hi, just a quick question this time... Is there a way to slow down the speed at which the console produces text? You see, am trying to create a sort of 'NPC' ...
[2 replies] Last: A delay function: http://www.cplusplus.com/forum/unices/10491/page1.h... (by Duthomhas)
by nanger
error in opening files
 
using namespace std; #include <iostream> #include <fstream> #include <string> string filename ; filename ="output/prob_search_fail.txt"; fi...
[1 reply] : Do the files exist in the currect directory the program is running in?... (by kbw)
by DCC1
Rectangle Class - Using a class as member data
 
Hello, I am a beginner programming in C++ and have searched for explained examples of "rectangle" classes, but have only found simple examples that do not use c...
[3 replies] Last: Though it's not in front of me right now, I believe msvc++ has a "watc... (by jeffbmartinez)
by jayt
protected access specifier
 
Hello, I have started studying classes after functions and structures.I got the meaning of public and private but I am still confused with protected data in cl...
[2 replies] Last: thank you Disch (by jayt)
by mdgdoc
Under construction
 
Good Day, To construct an array to accept 10 integers, then display a table output with the following data, Value(entered) Percent of total (% of Sum) 1...
[2 replies] Last: Here is the attempt to get the max/min of this array and it says I hav... (by mdgdoc)
Overloading assignment operator
 
Greetings. I am trying to overload an assignment operator for an object so that a statement such as "X = 5;" is legal. However, the code won't compile. ...
[3 replies] Last: It is happening because the line: throwaway_class var3 = 6; ... (by jsmith)
Symmetric Matrices
 
int row1,column1; cout<<"Enter The Number of Rows:"; cin>>row1; cout<<"Enter The Number of Columns:"; cin>>column1; int matrix ; int i,j; cout<<...
[3 replies] Last: You would loop through the matrices the same way you would looped thro... (by firedraco)
by Laeion
Generating Random Numbers
 
s0ftware: Visual C++ 2008 Express inf0: Console Project c0de: srand ( time (NULL) ); valueX = rand()%LIMIT+9; // Must start higher than 10 ...
[4 replies] Last: valueX = rand()%LIMIT+9; // Must start higher than 9, include 9 ... (by zipuch)
Array rotation
 
I'm trying to make my program rotate mylist to the left. I'm having an issue with the for loop and storing a temp value. the output should be like this 0 0...
[2 replies] Last: I addition to what Bazzy suggested, the std::rotate works with arrays ... (by kempofighter)
Vector bidimensional & class variables
 
Hi to all. :) I need to create a bidimensional vector and work on it like a bidimensional array. I don't find any example of code and all the implementatio...
[3 replies] Last: For simplicity, just use a vector of vectors. (Sorry to have forgotten... (by Duthomhas)
c and IA32 assembly languauge
 
What is to key to translating code written in C into assembly code? I have tell what the funcation is doing and what arguments passed. Where do I start...
[5 replies] Last: yup. (by jsmith)
associative array 2 deep
 
Id like to make an array that can contain any type of data, so I guess I would have to use the string type. Basically its going to store results from a data...
[9 replies] Last: I have seen 2d maps implemented as Hammurabi suggested, so I don't kno... (by kempofighter)
change array references to pointer references
 
this is my program. it creates random letter, then you select which ones to change, with some character. #include <stdio.h> #include <stdlib.h> #includ...
[1 reply] : change char check ( char it ); to char check ( char* it); ... (by kempofighter)
Minimum Binary Heap problem
 
Hello! Using Cormen's "Introduction to Alogrithms" I modifed Max Binary Heap and created implementation of Minimum Binary Heap. But somewhere something goes wr...
[5 replies] Last: Ok. Line 97 is unneeded i think, I don't know why write this, i found ... (by petra999)
by dooper
distance calculating program
 
i have to make a program which calculate disstance b/w 2 cities i try my best here is my code #include <iostream> #include <string.h> using namespace std;...
[3 replies] Last: @ zipuch i have to use stricmp to compare two strings @ helios i d... (by dooper)
Create, delete and recreate same object with global visibility
 
Hello. I need some help to point me on the right direction to do something like this: I have 2 similar classes ( Ortho and Frustum ) and this is what I would...
[11 replies] Last: Did you put the semicolons after the class closing brace? class Ba... (by Bazzy)
by masiht
Problem with this program (1,2)
 
I have been studying classes from a few weeks and now I want to apply the theory of what I studied so far.I made this program .CAn someone tell me what is wrong...
[23 replies] Last: masiht, You, the person who could not write the simplest class, w... (by closed account z05DSL3A)
May 2009 Pages: 1... 1516171819... 21
  Archived months: [apr2009] [jun2009]

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