General C++ Programming - January 2012 (Page 29)

Allegro getting choppy
 
#include <allegro.h> int makerect(int selectedcolor, int a, int b, int c, int d); int main() { allegro_init(); install_mouse(); install_keybo...
[2 replies] Last: acquire_screen(); must be called before drawing to the screen and rele... (by closed account GbX36Up4)
Help with my RPN calculator using c++ #include <stack>
 
#include <iostream> #include <stack> void calculation(int, int, char); using namespace std; stack<int> a; void main(void) { bool expression = ...
[18 replies] Last: Look at KBW's example: http://cplusplus.com/forum/general/58633/#msg31... (by Galik)
How to print ascii art in c++?
 
may i know how can i cout _ -=\`\ |\ ____\_\__ -=\c`""""""" "`) `~~~~~/ /~~` -...
[9 replies] Last: @Enzo Ti Instead of making a new image and cout it, why not just move... (by whitenite1)
need help!!
 
hello everybody ... i am trying to do a cinema reservation .. but i have problem with the seats ... this is my code for now #include <iostream> ...
[5 replies] Last: cRows - 'A' (by ne555)
by mar11
generic interface
 
Consider the following code: class A {}; class B : public A{ int b; }; class C : public A{ int c; }; template <class T, class Y> //generic function foo(T...
[5 replies] Last: It is really irrelevant for this particular problem that B, C etc. are... (by JLBorges)
Clearing a Window with win 32
 
Hey there, I am new to this and am teaching myself. I have been searching the internet but cannot find a reference to what I am trying to do. I have learned ...
[7 replies] Last: Check out Qt. If you build a QtWidget Based Application things are p... (by Stewbond)
by ToniAz
Outputting to working directroy
 
Hello everyone! I'mtrying to use ofstream to output to a file in the working directory. The file doesn't exist and neither does the directory. I was tryin...
[5 replies] Last: Whoop, I haven't checked this thread for a while. wtring is partiall... (by Stewbond)
Using loops to put data from file into struct
 
Hi, I have to put some data from a txt file into a struct but I have no idea how to do this. Here is some information: I have a structure that looks like t...
[11 replies] Last: Ok, i have managed to do this like you said. I used the "convert" meth... (by matache)
Template Specialization
 
I am being driven Nuts by a simple Template specialization problem Here is the code, Its intent is straightforward, #include <iostream> using name...
[4 replies] Last: > why would this be though? The reasons are somewhat arcane; but prim... (by JLBorges)
How to limit the scope of define?
 
In several different header file, there are different value defined to a same name. For example, in header file "listing.h", there's code #define MAXNUMBE...
[5 replies] Last: Thanks, guys~ :-) (by Richard He)
by Laveer
Closing a Mutex Handle (1,2)
 
I'm trying to close a mutex handle, which permits one to only run one instance of the program. I know I can open a handle by doing this ; HANDLE hMutex = Op...
[22 replies] Last: Thank you so much... I finally completed it. (by Laveer)
C++ ifstream not working (1,2)
 
#include <iostream> #include <windows.h> #include <fstream> using namespace std; void mainmenu(); void loadgame(); void loaddesc(); void readdesc(); void inp...
[35 replies] Last: I ditched this project a while ago but I think it had something to do ... (by closed account GbX36Up4)
by Tatipu
Dividing fractions when reading from txt file.
 
Hi, my dad gave me an assignment where I've pretty much got everything down except I have no idea how I would be able to do something like this: 10/5 = 2 1...
[1 reply] : Nevermind, I just wasn't thinking :\ if (num1%num2 > 0){cout.setf(i... (by Tatipu)
array bound index validation
 
as in c++ there is no such array bound index validation, on what does the arbitrary result depends on ? for eg: int a ={4,8,0}; if i print : cout <<a ; i...
[8 replies] Last: You can also use templates to get that information from an array (but ... (by Duthomhas)
by tition
std::vector<std::stringstream> does not work?
 
Just lost 1+ hour nailing down my problem to: #include <iostream> #include<vector> #include<sstream> int main() { std::vector<std::stringstream> X; X.resiz...
[5 replies] Last: Yep, templates errors can be hard to read. Especially when is not your... (by ne555)
Linux C++
 
Please, someone knows a way to debug in c + + on linux? thank you
[6 replies] Last: I find DDD pretty decent. It has an incredibly old feel to it but it's... (by closed account S6k9GNh0)
how to rotate 90 2d array?
 
hey guys i got an image that when u open it u see a matrix. and i need to rotatre the picture in 90 degrees.==>>> it means to rotate the matrix now the thi...
[4 replies] Last: To do this you may need to know a little linear algebra. Specifically... (by Stewbond)
by rithan
theather booking confusion
 
im having problem in the part where wer the movie is choose...it ended up when its shows the movie..i need to choose the movie,,then hv to proceed to seating......
[3 replies] Last: void bookseats(bool& seats ) { int seat_number = 0 ; cout... (by bluecoder)
sprintf in a for loop
 
I made a program to do binomial expansion, but when I print the answer, it prints things like: 1x^3, 3x^0, 2x + -1 etc. I tried to use sprintf to get the whole...
[1 reply] : sprintf(print, " %c ", "+"); Won't do what you think. You need: sp... (by kbw)
Please help me
 
Please help me I'm from Brazil and I need to know how to find the beginning of a system developed in C + +. Anyone have any tips, because I have many files an...
[1 reply] : I really don't understand what you want. how to find the beginning of... (by ne555)
January 2012 Pages: 1... 2728293031... 36
  Archived months: [dec2011] [feb2012]

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