General C++ Programming - June 2011 (Page 26)

Pass Object by reference.
 
Hi, If I have function prototype as void function_test (AnyClass &obj); and when i am calling this function function_test(AnyClass()); I am ge...
[3 replies] Last: Thanks a lot for your's great and nice explanation... thanks (by dearvivekkumar)
Centering txt output issue
 
Hi, I'm having a problem centering variable data thats being printed to the screen. Since the text im using is different from the variables. Now i have...
[13 replies] Last: I often find it helpful to get out a piece of graphing paper and draw... (by helios)
starcraft broodwar API (BWAPI) problem
 
I decided to play with this the other day -> http://code.google.com/p/bwapi/ I downloaded the latest version and tried to build the example AI only to end up...
[4 replies] Last: Obviously. After all, it's a linker error. Ok, instead of trying to re... (by m4ster r0shi)
Inserting commas
 
I am writing a program to recursively insert commas into an int larger than 1000. I have began writing the program but am having trouble. Here is what I have so...
[2 replies] Last: Thank you very much!! (by beamese)
by KaiL
Lucas Kanade Method in Real Time Problem
 
This is my code. #include <cv.h> #include <highgui.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <cxcore.h> #include <iostream> #includ...
[1 reply] : http://www.cplusplus.com/forum/articles/1295/ (See "when asking about ... (by helios)
formatted print
 
Hi I have a noob question wishing someone will explain this to me. in a printf what does 10.5f mean? could i get some examples? Im doing assignment and i have e...
[4 replies] Last: [quote=whoami32]so the number 10.5 is just a value? Both 10.5f and ... (by closed account zb0S216C)
by JimSim
.def Files, dll, Linking Error
 
Hi all I think that I should start this by saying that I am fairly new to C++. Currently, I can only write basic OOP programs. However, I have been given...
[4 replies] Last: The exporter of the class/function must declare it to be __declspec(dl... (by kbw)
Octet to char conversion
 
Hi, I am trying to get a mean shift algorithm code to work. The code is written for a linux based environment and I am working with windows so I have to make...
[1 reply] : The devc++ compiler gives the error that there's an invalid conversio... (by kbw)
Memory Leaks.
 
How do you avoid memory leaks in a linked list having pointer based head and tail?
[1 reply] : Buy implementing the linked list as a class and providing suitable con... (by kbw)
A strange thing about enums
 
Hello. Yesterday I started to compile a project, a BHO for Windows 7. The BHO requires some user input so I decided to use Task dialogs. One of the thing...
[4 replies] Last: That example has 2 features. For 6 features you would either have to l... (by kev82)
const double ** pointer
 
I made a simple function copying the values of the array a, which is double **, to the array b. void copy2(int dim1,int dim2,double **a,double **b); It wo...
[3 replies] Last: Your way of reading/interpreting pointers is really awesome!! I wi... (by Disch)
A c++ question with sorting
 
Alright, so I have this program that I'm writing and I need to find all the possible outcomes of a the last 5 digits of a 10 digit number. So, I have the user i...
[19 replies] Last: You aren't supposed to push_back(sum); the generated number is n , so... (by Duthomhas)
redirecting an operator to a property!
 
Hi to all, I'm trying to redirect the from a class to a property of that class Class Myclass { bool myBool; string myString; map<int,string> m...
[1 reply] : Yes, just overload the operator: class Myclass { //... ... (by Disch)
by baloch
Searching
 
Please help me that i am developing my project which is given by my teacher to me that is to make a simple database by using c++ in c free compiler i have made ...
[1 reply] : Have you worked on this yourself at all? (by Zhuge)
Shuffling Random Numbers - lottsa them
 
the algorithm for shuffling a small number of random numbers is simple suppose we want to shuffle N numbers from 0 to N-1 1. initialize a vector<int> v; to N ...
[15 replies] Last: The last bit isn't group theory, it's analysis I guess. What it's tryi... (by kev82)
Building a tree cleanly (1,2)
 
I'm looking for a way to write a tree so that it does not look ugly. Let's say I have struct Node{ /*abstract*/ }; struct Branch : Node{ std::vector< Node* ...
[20 replies] Last: v.nice - you've built a parser out of operators! LoL not only that, i... (by kfmfe04)
rtti behind the scenes
 
General opinion is rtti is bad for performance. Rtti is implementation specific but I will try to discuss an approach: Every object (with rtti support) has a p...
[1 reply] : If you try to call any virtual function from a Base*, you will have to... (by firedraco)
by LoOpz
Bidimensional Arrays Dynamic Memory
 
Hello, I know how to dynamically allocate bidimensional or multidimensional arrays. But the problem is when I free the memory space. I know I have to delete ...
[3 replies] Last: Thanks alot! (by LoOpz)
by rucafe
sorting data into classes
 
I have a file that contains thousands of numeric entries sorted into four columns. The structure of the data looks something like the following: \\ {Energy, ...
[no replies]
Importnant Request
 
Develop an interactive transaction processing system to demonstrates using random access Files to achieve instant access processing of bank account information...
[5 replies] Last: Okay. First of, a little help. Let's look at the problem statement in ... (by diedrexler)
June 2011 Pages: 1... 2425262728
  Archived months: [may2011] [jul2011]

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