General C++ Programming - April 2012 (Page 42)

problem with taking transpos of Matrix
 
When i ran code below,it read matrix and display matrix twice without taking transpose of matrix.What is problem there kindly help me out #include <iostrea...
[1 reply] : First: Use indents in your code to make it readable. Second: Use the w... (by TheDestroyer)
by shaggy
Very quick question
 
hello, when i create a new class ( for my player or enemy or bullet etc.) do i need to have it in its own header file? i already do, but could i just have the c...
[2 replies] Last: ahh i see thankyou. so it is best to put it in its own header so i can... (by shaggy)
dynamic array deletion
 
I'm having trouble deleting a dynamic array and am getting a glibc detected error message. Code is as follows: #include <iostream> using namespace std; ...
[1 reply] : If you allocate with new , you must deallocate with delete . int *me... (by Moschops)
creating AVI from BMPs prob
 
Hi ! I'm currently trying to speed up the AVI writing process in my project. So far I've been using cvVideoWriter but this turns out to be a bit slow. Now I'...
[1 reply] : I've just tried ''uncompressed'' from the menu and it worked. So it se... (by dudewhatsup)
How to delete an object that has more than one references?
 
Hi, I have two diffrent lists which they hold refenrences to same object. The problem is; I couldn't figured out what should I do when I delete the ob...
[3 replies] Last: It's a two step process. You have to remove the list and you have to ... (by kbw)
Modulo Operator with floating point numbers
 
Hi, I was just wondering why modulo operator cannot be used with floating point numbers in C and C++. I am trying to know the reason behind it. Any help w...
[2 replies] Last: If you want modulo for floating point number you can use std::fmod. (by Peter87)
adding member variables using member functions
 
Hey, I am trying to do a simple program using class. I just learned how to write in class however I do not know how to add variables. This is what I have so far...
[4 replies] Last: [quote=Matthew Shoppas]Whats the class equivalent to: x=9 y=5 z=x+y ... (by closed account zb0S216C)
by sravan
Sorting of map with value
 
map<char*, int> testMap; I need to sort this map in ascending order using value. How can I do it?
[1 reply] : What's in the map? Why do you think it's not sorted? (by kbw)
Help: Find problem from the code
 
I have to find a problem in this file, but I can't find it. Please help me and explain what's the problem. Thank you in advance. #include <stdio.h> #include...
[1 reply] : What is the problem? How are you running this program? You do realis... (by kbw)
find_first_of problem
 
#include <iostream> #include <list> #include <string> #include <algorithm> int main() { std::list<std::string> ls; ls.push_back("one"); ls.push_...
[2 replies] Last: Ok. Thanks. Looks like std::find is what i want. (by morando)
by won212
Priority Queue
 
Hi could any expert explain to me how this works? especially those in bold. Been figuring for a couple of hours & hope to understand how this code works. Than...
[2 replies] Last: Seems to be a pretty dirty implementation of a PQ. I suggest making ... (by Gaminic)
decimal points of a double
 
Hi all, I would like to ask is it possible to truncate a double number with variable decimal points ? For example, a=0.003457834 truncate to a=0.0034578...
[1 reply] : floating point numbers are typically not stored in a decimal format. ... (by kbw)
Getting Wrong Answer !?!
 
Here's the question :- Siruseri happens to have some of the best chess players in India and one of the most important events in the Siruseri sports calendar is...
[no replies]
Putting void f() as function call argument - g(f())
 
Greetings, in an interpreter-like environment, I have a function lookup table. To handle different signatures in one table, the function pointers are wrapped...
[no replies]
Function Problem, help?
 
I have to code for functions. 1. GetWholeSale() - ask for user's whosale, validate, and return 2. GetMark() - enter markup, validate, and return 3. CalculateRe...
[10 replies] Last: The first problem is that line 6 and 29 don't match. Line 6 must be li... (by coder777)
by Docido
Direct X vector question
 
I recently got a new book on programming with direct x. While I was reading through the chapter about vectors, I found this line in the sample code, which creat...
[2 replies] Last: Ah, ok thanks a lot. (by Docido)
by Jp P
Debugging problem
 
Well the program is simple enough, I'm taking a list of numbers from a file, then finding the average, lowest, highest, ect.. however this compiler error is ge...
[2 replies] Last: Thanks man that did it! It's always the little mistakes that take the ... (by Jp P)
Please Help Me What's wrong with this code?
 
#include <stdio.h> void test(char *str) { printf(str); } int main(int argc, char **argv) { char *userstr; if(argc > 1) { userstr = arg...
[2 replies] Last: char* can be implicitly cast to a const char*, Alby. Just not the oth... (by Disch)
scripting language for game engine?
 
so i realise this isnt really a c++ specific question, but still feel like asking it: why is it that every engin i find seem to use a scripting language in a...
[4 replies] Last: Well, not just simple things. Scripting languages tend to actually be ... (by closed account S6k9GNh0)
Infinite Loop
 
Hey all i would appreciate any help here. I had to create a menu and did so, but the problem is every a letter is pressed instead of a number the code goes into...
[4 replies] Last: http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.2 (by cire)
April 2012 Pages: 1... 4041424344... 49
  Archived months: [mar2012] [may2012]

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