Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #4K
~2K People Reached
Favorite Forums

7 Posted Topics

Member Avatar for alvinwong

Hi, I am using Dev-C++ 4.9.9.2 with g++ compiler. I recently made a DLL in c++ that shows a window using Windows API. I discovered that the text shown inside are large and bold, which aren't looking very good. I want to change this, so I used the following code …

Member Avatar for alvinwong
0
1K
Member Avatar for BobRoss

I uses this: [CODE=c++]#include <iostream> #include <conio.h> using namespace std; char a; int main(){ /* Clean keyboard buffer by a stupid way. */ /* In fact, there is some other way. */ while(kbhit()!=0){ /* kbhit() returns 0 when there is nothing in the keyboard buffer. */ getch(); /* Get one …

Member Avatar for alvinwong
0
187
Member Avatar for kenetpascua

Don't really understand what you want to do. Do you want to display a menu and execute the corresponding program??? You should put the program into a whole one. The program simply can't know the filename. Give you a simple way to draw a menu: [CODE=c++]#include <iostream> using namespace std; …

Member Avatar for kenetpascua
0
112
Member Avatar for tfmontague

In fact, c++ array uses computed address, when you pass it to a function, it actually passes the starting pointer of it (the one with index [0]). So when you modify the content, it is modifying the actual memory that you uses it. I will copy the whole array if …

Member Avatar for alvinwong
0
98
Member Avatar for creative_m

Firstly, do you know what is recursion? [CODE]void a(int z){ if(z>0){ a(z-1); cout<<z; } } [/CODE] This is a type of recursion. Calling [ICODE]a(5)[/ICODE] will output:[QUOTE]12345[/QUOTE] Calling stack: a(5){[INDENT]a(4){[INDENT]a(3){[INDENT]a(2){[INDENT]a(1){[INDENT]a(0){}[/INDENT]; cout<<1;}[/INDENT]; cout<<2;}[/INDENT]; cout<<3;}[/INDENT]; cout<<4;}[/INDENT]; cout<<5;} Any idea on it now? We are not supposed to help you write the whole code, …

Member Avatar for alvinwong
0
93
Member Avatar for tinkeydo

It is a very simple problem. On line 33, there is [ICODE]length--;[/ICODE]. After the first loop in the for scope, length is already 0. In the rest turns, it cannot return true in [ICODE](length > 0)[/ICODE], as length has already been reduced to 0. It is better to declare another …

Member Avatar for alvinwong
0
109
Member Avatar for bijayswain

Windows only allow one console window to be assigned by one thread. You may save the output to a file and capture it. [CODE=c++]#include <iostream> #include <cstdlib> using namespace std; int main(){ cout<<"Write to console now.\n"<<flush; freopen("C:\\myFile.txt","w+t",stdout); /* Redirect standard output to file. */ cout<<"Write to file!\n"<<flush; /* REMEMBER "flush" …

Member Avatar for alvinwong
0
117

The End.