49,761 Topics
| |
from MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/dd145213%28v=vs.85%29.aspx "An application returns zero if it processes this message." see these code on my label control: case WM_PAINT: { PAINTSTRUCT test; BeginPaint(inst->hwnd, &test); image imglabel(inst->imgtest.width(),inst->imgtest.height()); brush brshbackcolor(inst->clrBackColor); imglabel.Backcolor=inst->clrBackColor; brush brshTransparent; FillRect(imglabel,&test.rcPaint,brshbackcolor); if(inst->imgtest.haveimage()) DrawHICONtoHDC(imglabel, inst->imgtest); imglabel.DrawText(inst->strCaption); pen penColor(1,2,RGB(0,255,0)); penColor.ToDC(imglabel); imglabel.DrawRectangle(10,10,10,10); pen penColor2(1,2,RGB(255,0,0)); penColor2.ToDC(imglabel); imglabel.DrawLine(0,0,20,20); pen penColor3(1,2,RGB(0,0,255)); penColor3.ToDC(imglabel); //brshTransparent.ToDC(imglabel); … | |
Hi guys, I just found out that setw is not recognized in Netbeans C++ with Cygwin even when IOMANIP is included in my program. Is there anything I can do for this? I need to format the output of my program, thanks. | |
My code is working almost the way I need it to. However, when I run the program I am getting this Welcome to Johnny's Restaurant Bacon and Egg $2.45 Muffin $1.98 Coffee $0.50 Tax $0.25 Amount Due $5.18 When I want to get this: Welcome to Johnny's Restaurant 1 Bacon … | |
This is supposed to used quick sort using the header "arrayListType.h using quick sort and get the numbers entered smallest to largest but I'm not sure on how to do it. Can I please get some help? #include <iostream> #include "arrayListType.h" #include <cstdlib> using namespace std; void printList(arrayListType<int>& list); void … | |
# Im a beginer in programing language, i just started programing using turbo c++ , however every time i download a c++ software from net it turns out to viral and it doesnt work properly. please kindly send me a link from which i can install turbo c++ as soon … | |
Hi, I managed to change a cursor in C++ windows console size using the function HANDLE output = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_CURSOR_INFO cz; cz.dwSize =100; cz.bVisible =TRUE; SetConsoleCursorInfo(output, &cz); But I'm having a hard time to make the cursor not to blink. I couldn't find any function in MSDN to do that. … | |
Hey, guys. A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a² + b² = c². For example, 3² + 4² = 9 + 16 = 25 = 5². There exists exactly one Pythagorean triplet for which a + b + c … | |
HI everyone, I need help in c++. Problem : I want to write a program that calculate x digits of pi. Like if my input is 3 output should like this 3,14 or this 3,145 if my input is 10 output should like this 3,14529xxx or lik this 3,14529xxxx. I … | |
Hi all, This is something very basic i know. I just wanted to avoid some confusion. What is the difference between char *names[100]; and char names[100]; This is what i know char names[100]; - its just a character array which can hold 99 characters and the last one will be … | |
If i have an array of names char *names[100]; (stored as pointers to strings), how to find the name that appears the most times in the array and how many times it appears. (a) if only one “mode” (b) multiple “modes” I'm thinking of implementing something similar to selection sort … | |
Hello, guys. How would I deal with a variable that needs to be biggers than an unsigned long long integer? Thank you. | |
Hello, guys. This challenge asks us to find the 10001-th prime. Here's my code: // A reasonable approximation is to say that the n-th prime is such that p(n) = n*(log n + log*(log n) - 1). // With that in mind, we can say that the 10001-th prime is … | |
HELLO everyone i have a problem with which link is here can anyone help me please http://acm.epoka.edu.al:8080/en/problem-pid-c50f?ps=1&smt=a&smpwid=0 | |
This is what I have so far #include <iostream> #include <iomanip> using namespace std; const int NUM_SECTIONS = 3, NUM_ROWS = 5, NUM_COL = 9; int main() { int seatTable[NUM_SECTIONS][NUM_ROWS][NUM_COL] = { { { 100, 100, 100, 100, 100, 100, 100, 100, }, {100, 100, 100, 100, 100, 100, 100, … | |
I've just started learning C++ on Linux. I have written a very small program which compiles but I get run time errors everytime I run it. The code is shown below: #include<iostream> int DoubleOf(int n); int main() { std::cout << "Double of 5 is " << DoubleOf(5); return 0; } … | |
how do you write a c++program using the do while and while do loop to list prime numbers between one and thirty | |
Hi guys I am really having trouble on what to do with my program. We are asked to make a cashier's program and I don't know how to do the the Receipt... I don't know what to do in the order part... how about if the customer will order 3 … | |
Write a program to check the password is too strong or strong or weak & also check the password is validate or not.. you can use code of c/c++ and you want .... | |
Write a program that accepts three values from a user and print the two highest value and thier sum. | |
OK, so I've asked a question like this before and I thought I understood the answer (solved) but I am having problems again and I still do not understand why. I am compiling with MinGW. Here's the code: string filename="D:/__GNU analyze/test/bin/Debug/_ClusterFormat/Test2.6d .txt"; fstream file, file2; string cluster="frame"; string line; Matrix … | |
I have this in a code: ` int load_snapshot(char *fname, int files) { FILE *fd; char buf[200]; int i, j, k, dummy, ntot_withmasses; int t, n, off, pc, pc_new, pc_sph; #define SKIP fread(&dummy, sizeof(dummy), 1, fd); for(i = 0, pc = 1; i < files; i++, pc = pc_new) { … | |
plz some one explain in details this code : we have array of 9 cells and 0 present empty locations we want solution of this array (no number will be repeated) also if there is any way to call this functions in main so as the program runs succesfully plz … | |
Hey guys im having a problem in structures.. i dont know how to initialize a an array of 10 contact instances.. plz help me out. this is my question statement.. "Declare a structure Contact that has a name, address, mobile number. Now create and (hardcoded) initialize an array of 10 … | |
hi i have a unknown string in c++ containing "\n" "\t" etc. say; string unknown1="\n\t\n\t\n\n\n\n\n"; now I want to print "\n\t\n\t\n\n\n\n\n" to the screen explcitly other than a bunch of empty spaces.... how should I do that? remember that I don't know what is in unknown1... | |
I have downloaded the program from here http://www.tightvnc.com version 2.7.10 and compiled successfully using visual studio 2013. One is the tvn server and other is the viewer. We connected successfully the server and viewer using my friend’s laptop pair with server and client interaction. When the application runs all the … | |
Hello Everybody , i have array of size 9x9 i want to write a function to Check each 3x3 box | |
when I exit a function i get 'general protection exception' -' processor fault'. Function writes to file and works ok except won't exit. What does this mean please, and where should I look ? Am using Turbo C 4.5 & Windows xp. Must be overwriting memory somehow I suppose but … | |
Use an array to store the grades. Use a looping structure to populate the array. Calculate the numeric average based upon the 4 equally-weighted numeric grades. Display each of the 4 numeric grades from the array on the screen using a looping structure. Display the numeric average. Create a function … | |
hi all ihave required a program any body help me please Write a programme that use three arrays mango, orange and banana to store the number of fruits purchased by customer. The programme inputs the number of mangoes, oranges and bananas to be purchase by customer and stored them in … | |
Hello, guys. The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698747158523863050715693290963295227443043557 66896648950445244523161731856403098711121722383113 62229893423380308135336276614282806444486645238749 30358907296290491560440772390713810515859307960866 70172427121883998797908792274921901699720888093776 65727333001053367881220235421809751254540594752243 52584907711670556013604839586446706324415722155397 53697817977846174064955149290862569321978468622482 83972241375657056057490261407972968652414535100474 82166370484403199890008895243450658541227588666881 16427171479924442928230863465674813919123162824586 17866458359124566529476545682848912883142607690042 24219022671055626321111109370544217506941658960408 07198403850962455444362981230987879927244284909188 84580156166097919133875499200524063689912560717606 05886116467109405077541002256983155200055935729725 71636269561882670428252483600823257530420752963450 Find the thirteen adjacent digits … |
The End.