General C++ Programming - October 2010 (Page 8)

by god
Vector <class>
 
can some one help me or give me the algorithm in this problem: a 'class' named STUDENT has attributes like Name Age ID_Number Grades. i should store in a 'vect...
[4 replies] Last: please hi-jack the code please???? (by god)
A promble about template!
 
I defined a tempate class like this,it works fine,but I am a bit confusing that why the constructor's parameters must be const? Can someone help me explain that...
[3 replies] Last: Thanks a lot! jsmith and blockcoder41 I think I hava got the answer,I ... (by zhangxiaobin)
Testing an Overloaded Stream Operator
 
Hey guys, I'm wondering if there is a way to have access to the buffers used within cout/cin such that I can verify that overloaded stream operators are working...
[3 replies] Last: stringstreams are both istreams and ostreams, so yes, it will work jus... (by Disch)
C++ to java convertor
 
Hi, Is there any tool available for conversion of C/C++ source to java equivalent. We are looking a tool which is good as per industrial point of view.
[7 replies] Last: Damn - if I were paying someone to convert C/C++ code into Java, I'd e... (by kfmfe04)
Need assistance with reading from .txt file. (1,2)
 
Okay so for my computer science class were supposed to be writing a program that reads in information from a text file, okay so that's the easy part but display...
[20 replies] Last: Yeah I fixed 39 and I just set all my ints to 0 and everything appears... (by skatingrocker17)
problem in displaying array elements
 
#include<stdio.h> #include<conio.h> int *fun() { int i ={1,2,3,4,5}; return &i ; } void main() { int *p; int i; clrscr(); p=fun(); for(i=0;i<5;i++)...
[2 replies] Last: buzzy i think you d't know how to solve it anyway i came to know... (by saikumar029)
Working with openGL on VC++ dialogs
 
Hello, I am making a GUI in visual C++ which is using openGL to draw images and textures on dialogs. The application has two dialog windows, parent and a chi...
[no replies]
About switch statement
 
Please help me. I have code as following Code: # include <iostream> using namespace std; int main() { int num = 1; switch (num) { case 1, 3, 5...
[5 replies] Last: You can also say: switch(x) { case 1: case 3: case 5: // ..... (by filipe)
by Null
Moving a ball at specific angle
 
Hello, I'm writing a very simple Pong game in SFML and I'm wondering how to move a ball at specific angle. Currently I have something like this: bool ...
[8 replies] Last: http://www.khanacademy.org/#Trigonometry (by blackcoder41)
static functions Why??
 
Static functions are those functions which do not have the access to "this" pointer of the class and it can not be declared as virtual. why??
[13 replies] Last: I have some time before work so here's some practical examples. ... (by Disch)
by Achon
Need assistance with Beep Song issues
 
I am currently making a Base Maze game. I have it complete EXCEPT for figuring out how to get my Beep Song not to screw me over. When I have it implemented, it ...
[no replies]
2 binary files
 
how to read out 1 binary files and edit/update/append the other accordingly ? eg.. binary file 1 have a few data - 1. ABC - 2. CDE - 3. FGH ...etc...
[2 replies] Last: any one ? (by nanochan1)
by Juisoo
How to check if stl.iterator points somewhere?
 
As it is possible to default-construct an stl-container iterator I'd like to know how to check, if the iterator points somewhere meaningful. Consider std::m...
[4 replies] Last: Ok thanks, that was what I did in the end. Just thought there might be... (by Juisoo)
cout number 1 as 01
 
how do i go about that ? i know can use setw but i would prefer if the 01 can slowly increment all the way till like 11, 22, 54 and etc etc..
[1 reply] : You need to combine setw with setfill.Check out the iostream reference... (by Mike Sandy)
SFML Woes...
 
I'm with a friend right now trying to install SFML and am having an abundance of problems. It seems we've both managed to get this error: This application h...
[13 replies] Last: I fixed it by installing a dw2 version of TDM-GCC by using the on dema... (by sim642)
by firix
static members problems
 
hi Define two classes, each with a s t a t i c member, so that the construction of each static member involves a reference to the other. Where might such const...
[1 reply] : http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.14 (by PanGalactic)
clairify bitwise operators
 
So a 'potential' assingment asks to use bitwise operators on an int . the paper give some info but i am kinda confused as to what is being done in memory. ...
[3 replies] Last: An int can only hold one value at a time. int original_value = 1... (by jsmith)
fixing timer in C++ to calculate execution time
 
hi I want to calculate the execution time of external platform language(C++) that is called in the form of .dll in the revolution studio script so my point ...
[no replies]
storing object into array
 
e.g. class emp { private: ...... ...... public void setEmpSalary(double); void setEmpName(string); } main() { char stores ; int i; for (i = 0; i...
[6 replies] Last: ohhh understood. Thanks. (by caiweilian)
vector error (type)
 
what's wrong with my code (bold part) at Square.h. why can't i declare a vector of type SIDE?? vector <SIDE> x; Square.h #ifndef SQUARE_H_INCLUDED ...
[1 reply] : std:: vector (by hamsterman)
October 2010 Pages: 1... 678910... 23
  Archived months: [sep2010] [nov2010]

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