General C++ Programming - June 2010 (Page 16)

loop output weird problem
 
#include <iostream> #include <string> using namespace std; class Hash { public: int locatePos(string, int); void init(string *...
[2 replies] Last: Dosen't matter... still does the same thing. (by brynpttrsn)
Questions about Arrays?
 
Hey I'm learning about arrays and I have some questions about them. I was wondering if arrays can be returned from a function? Updated: Which function ca...
[4 replies] Last: Yes thanks. (by Algorithms)
by cg9289
going from a .wav to .txt
 
Signal detection .wav to .txt No answers anywhere yet -------------------------------------------------------------------------------- I am currently writt...
[1 reply] : So, what exactly is your question? How to read the WAV itself? How to ... (by helios)
Having a problem passing a two-dimension array to a setfunction of a class
 
My program runs without any problem. The problem I see with my code is that the array may be going out of the array or is lost when it is being pass to the setf...
[4 replies] Last: int getArray() { return array ; } Please think this through m... (by kempofighter)
by vRltwE
How write a method that return a array of int?
 
I learn that a method can receive an array void my_method(int**matrix){ ... } But, and to return an array? I tried int** my_method(){ int ...
[2 replies] Last: You'll want to check out the articles database as well. Here are a co... (by kempofighter)
elimination of element outside of matrix dimension
 
Hello, In a function I trying to call elements of a matrix one at time according to method of step forward and step backward in space. My problem is in the st...
[no replies]
by vRltwE
How write a method that receive a array of int?
 
Hi, void my_method(int matrix ){ matrix = 0; } Why this does not work?
[2 replies] Last: Suppose you are a compiler and someone asks you to compile this: v... (by m4ster r0shi)
by declan
Object created from heap memory, are all its members?
 
Hi! If I create an object from memory off the heap, like this: MyObject obj1 = new MyObject; and let's say it has an array created non-dynamically as...
[4 replies] Last: Wow, thanks! Clears up a lot. (by declan)
by vRltwE
How to declare a matrix of int?
 
Hi, In java I do: int matrix = new int ; How I get the same in c/c++? *I do not want to use vector from stl.
[1 reply] : There are many posts around here that talk about dynamically allocatin... (by jsmith)
by masi
program moving objects
 
the program actually says that there is an error or at times it just doesnt run void moveplane(int **arr, int row,int col) { string direction; ...
[3 replies] Last: Well of (col - 1) is the LAST element, and you want to move right, the... (by Galik)
post increment operator overload
 
I am trying to do a rotating buffer, but the postfix++ doesn't behave like a normal char *. here it is cut down to a bare bones example... #include <cst...
[9 replies] Last: One thing i dont understand frankly is that how is the char of the str... (by bluecoder)
by skater
Chess programming question
 
Good day, i'm working on a project, a chess game with AI, and right now i'm at the stage of designing the function that checks if the king is in mate or checkma...
[1 reply] : There isn't much of an alternative. Generate your movelist ignoring... (by jsmith)
object& in turbo c++ (1,2)
 
I'm working in Turbo c++ (I know it is outdated but we are required to work with it, so I have no other option.) I came across this function declaration and ...
[21 replies] Last: Galik, thanks a lot. it worked! The weird message was because the obje... (by diffthinkr)
compiler error with /clr
 
Im writing on native C++ code for Direct2D and DirectX, which works fine. #pragma managed/unmanaged directives in my source should bring the compiler clearne...
[2 replies] Last: Thanx for your quick reply ! But rigth this time in the web I found... (by Mike911)
static or instance call..
 
So, I've been trying to make a very small logger class for debugging and info on my games. The problem I came across is that I couldn't decide if I should make ...
[1 reply] : I've used Apache log4cxx and it was fine even for small programs. It ... (by PanGalactic)
Templates and Inheritance
 
Hi Can I define that a Template must be a subclass of an interface class? I have defined an interface IComparable that expects to compare two items of...
[2 replies] Last: Looks okay to me. Did you mean to make the parameter a reference her... (by Galik)
exception:list iterator not decremental.why?
 
Hi. In my code I used a list to simulate a circle and declared two iterators to traverse it. while running,an exception appeared after eight elements was prin...
[2 replies] Last: well,thanks. but i don't think the problem is really caused by the us... (by Kathy L)
by srsg90
object out of scope
 
I have an assignment where I am supposed to be creating a class called SortedSet. It inherits from a class called IntList, which is a linked list class we crea...
[2 replies] Last: You don't need to dynamically allocate. Your set and list classes mus... (by kempofighter)
Good Game Programming Books
 
I was wondering if anyone knows any books on game programming in C++. I'd rather if it assumed that I already had knowledge of C++ because I don't want a bunch ...
[1 reply] : http://www.gamedev.net/columns/books/ (by helios)
forcefully destructor in class
 
Hi, do we have any scenario in the class where we have to declair destructor explicity?. if we do not declair than it will gives us compiler error.
[1 reply] : Not defining a destructor will not give you an error. That doesn't mea... (by hamsterman)
June 2010 Pages: 1... 1415161718
  Archived months: [may2010] [jul2010]

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