General C++ Programming - February 2012 (Page 26)

declaring a vector's type as variable
 
I am trying to read a wav file so that I can analyze the wave forms. To do this, I am placing each sample into a vector. My issue is that there could be 8, 16 ...
[11 replies] Last: JLBorges, yes that solved it. Disch, that's exactly what I did. I do... (by Stewbond)
Singapore Mahjong in C++
 
Basically I have to create Singapore Mahjong in C++ without a GUI which plays like this: http://www.singaporemahjong.com/sol/sol.… Each time you click draw n...
[no replies]
Creating a Vector Class
 
So for my assignment I have to create the Vector class and apply it to a main program to include the "Vector.h" file and no include the original Vector class. I...
[2 replies] Last: I figured it out. Thank you. (by f00tiefan)
Need help with hexadecimal addition program
 
it's something small i can only press lower case 'q' to stop the entry of each hexadecimal entry the code works but i want it so that i press enter after each ...
[4 replies] Last: something like this would save some space: int hex_1,hex_2; cout<<"\n... (by buffbill)
by Perman
I don't understand this. Please help. (1,2)
 
I'm new to Win32 GUI programming. My question is: Why does the WriteText function work fine in case WM_PAINT but not in case WM_TIMER. Messagebox comes out ...
[20 replies] Last: Got it to work. Moved definition of HWND hWnd to global from WinMain. ... (by Perman)
vector of pointers - deleting
 
Say I have class base { virtual a(); virtual b(); virtual ~base(){std::cout << "~base" << std::endl;} } class derived:public base { a(); ...
[6 replies] Last: Again, thank you. That is such a relief! this is my biggest project... (by closed account zwA4jE8b)
by Aikon
Startting a Blog
 
Hello everybody I'm doing a blog about templates C++, I have started today so there aren't many things but if you like it, feel free to follow it http://s...
[no replies]
by Perman
Is CALLBACK WndProc() an interrupt driven function.
 
After been working for many years with RTOS for all different kind of controllers (8bit - 32bit) I was wondering of the callback handler in Win32 GUI is interru...
[2 replies] Last: Thanks kbw. I was just wondering because in the very low level part of... (by Perman)
Problem with SDL!
 
Hello everybody i am having a problem with SDL, when i compile and run my game with the IDE it works just perfect, but when i ty to run the .exe aplication, it ...
[5 replies] Last: If you have no loop then the program is probably just exiting. Do you... (by closed account zwA4jE8b)
Initalization problem..if else contruct
 
Hey all, I'm trying to make a basic if else program. I keep getting a "Run-Time Check Failure #3 - The variable 'square' is being used without being initialized...
[7 replies] Last: yes, your braces are off. It helps to notice these things if you inde... (by Disch)
by sam021
Help with Array in simulation
 
basically; I'm running 2d fluid simulations using c++ code, I want to calculate something, and I need to output the original mass of the 2d grid as time goes o...
[1 reply] : Hi, please could you be more clear and specific, and when possible te... (by therockon7throw)
Error C2784 - Please Help!
 
Hi there, I'm new to this forum and pretty new to c++ as well and I can't seem to get this error figured out. Here is the full error message: C2784: 'std::ba...
[5 replies] Last: Moschops you may be right. I made a new project and just pasted the sa... (by Stephan Charbonneau)
Writing into config file using file streams w/o re-opening file.
 
Hello, I run g++ and Ubuntu. I need to read and write into a config file that has a few entries with simple format: key=value. When I write new value it c...
[5 replies] Last: mmap will work (I am on Ubuntu) - thank you! (by vincegata)
static variabls in base class
 
I have this game objects class, and I need a static variabls 'jumping'. This is becuase multiple derived classes need to know if 'jumping' is true or false. ...
[3 replies] Last: Hi , How are you using jumping variable in the derived class , can ... (by bluecoder)
by h9uest
HashMap implementation
 
Hi: Following the interface of unordered_map, I'm trying to implement my own hash map HashMap<class KEY, class VALUE>. template<class KEY, class VALUE> class...
[4 replies] Last: > primarily because I'll need to hash a user-defined object into some ... (by JLBorges)
by oonej
Overloading Operators (1,2)
 
Hey guys, New to the forums here. I'm a student taking C++ and need some help with an overloaded method. I've tried looking up everything but confused. Maybe s...
[22 replies] Last: to your question consider the class below class D{ private: int i;... (by therockon7throw)
by Nonlin
Convert letters to int values
 
Just got done with learning about for loops and functions in my intro to C++ class and I'm doing well with all the simple tasks our professor has us doing. Its ...
[3 replies] Last: so using the above knowledge and a simple for loop I've managed to out... (by Nonlin)
pls guys help ..dont know why is this code getting struck in the middle..pls help .pls pls
 
//program to insert data in a sorted file..... #include<fstream.h> #include<stdio.h> #include<conio.h> class stu { char name ; int marks; ...
[1 reply] : You're using non-standard C++ from 15 years ago and even getting your ... (by Moschops)
Getting warnings in my C++ variables
 
Trying to understand my warnings on 'double' to 'const int' possible loss of data and truncation from 'double' to 'float'. Not sure where I went wrong.........
[5 replies] Last: Start a new thread with your question, use tags, and get a compiler ... (by Moschops)
question about classes
 
Hi, i have to create a bankAccount class, witch describes a Bank Account. the public members are: the name of the Bank, the name of a Client, account number a...
[10 replies] Last: Peter, thank you very much!!! it works now:)) (by lena123)
February 2012 Pages: 1... 2425262728... 43
  Archived months: [jan2012] [mar2012]

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