49,761 Topics

Member Avatar for
Member Avatar for MamaTina21

I have this assignment: Write a program with three functions: upper, lower, and reverse. The upper function will accept a pointer to a string or C-string as an argument. It will step through each character in the string converting it (where necessary) to uppercase. The lower function will accept a …

Member Avatar for ZZMike
0
845
Member Avatar for lewashby

[Linux] I have had a hard time understanding pointers beyond a simple array step through and modifying one address at a time. When I get into pointers to C-structures, C++-objects and classes my head starts to hurt. And that's just to name a few. I find the C syntax `*++p` …

Member Avatar for mike_2000_17
0
422
Member Avatar for fnk88

Hi, I need your help please..I am given the following data and I need to write C++ commands to get the array filled... a[source][destination]=some value how to write C++ code for the following? loop condition can be used a[0][0]=0; a[0][1]=1; a[0][2]=1; a[0][3]=1; a[0][4]=3; a[0][5]=2; a[0][6]=3; a[0][7]=3;

Member Avatar for DavidB
0
234
Member Avatar for Edward16
Member Avatar for markdean1989

My main issue here actually is Visual Studio installer (just could not find a specific category above). So here is my poblem. Visual Studio won't progress installing. Once it reaches the Visual Studio C++ Runtime version (and some numbers), it does not progress any further. I even tried leaving my …

Member Avatar for markdean1989
0
242
Member Avatar for tom.lynd.39

How does this code work?? I am at a loss how the tail recursion works here? #include<iostream.h> #include<conio.h> void back(void); void main(void) { cout<<"Enter a sentence: "; back(); getch(); } void back(void) { char ch; ch=getche(); if (ch!='\r') {back(); cout<<ch;//Read a character, print the rest of the input in reverse, …

Member Avatar for mike_2000_17
0
164
Member Avatar for Hafiz_2

write a c++ program to declare an array named marks of ten elements.

Member Avatar for Moschops
0
46
Member Avatar for cambalinho

finally i have the static control transparent: //creating the form: hwnd = CreateWindowEx(0, classname, strCaption.c_str(),WS_OVERLAPPEDWINDOW | WS_TABSTOP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, parent, NULL, mod, this); //sending a message for subclassing: case WM_CTLCOLORSTATIC: { return DefWindowProc(HandleWindow, msg, wParam, lParam); } break; //heres how i create a static control with ownerdraw style: …

Member Avatar for cambalinho
0
728
Member Avatar for cambalinho

heres my image class: class image { private: ULONG_PTR m_gdiplusToken; Gdiplus::GdiplusStartupInput gdiplusStartupInput; HDC hdcimage=CreateCompatibleDC(NULL); HGDIOBJ obj=NULL; HBITMAP btBitmap=NULL; Image *img; bool isimgused=false; int imageheight=0; int imageweight=0; int framecount=0; int intSelectFrame=0; int framedelay=0; string strfilename=""; Gdiplus::Color clrBackColor=Gdiplus::Color::Transparent; HDC hdcwindow; bool blnTransparent=true; HICON HICONFromHBITMAP(HBITMAP bitmap) { BITMAP bmp; GetObject(bitmap, sizeof(BITMAP), &bmp); HBITMAP …

Member Avatar for cambalinho
0
296
Member Avatar for cambalinho

the control have the WS_TRANSPARENT style. and: case WM_ERASEBKGND: { return TRUE; } break; case WM_CTLCOLORSTATIC: { return (LRESULT)GetStockObject(NULL_BRUSH); } break; case WM_DRAWITEM: { DRAWITEMSTRUCT *test=(DRAWITEMSTRUCT*) lParam; image imglabel(test->rcItem.right-test->rcItem.left,test->rcItem.bottom-test->rcItem.top); if(inst->blnTransparent!=true) FillRect(test->hDC,&test->rcItem, CreateSolidBrush(inst->clrBackColor)); else FillRect(test->hDC,&test->rcItem,(HBRUSH) GetStockObject(NULL_BRUSH)); FillRect(imglabel,&test->rcItem,CreateSolidBrush(inst->clrBackColor)); if(inst->imgtest.haveimage()) DrawHICONtoHDC(imglabel, inst->imgtest,1,1); SetBkMode(imglabel,TRANSPARENT); char *text=(char*)inst->strCaption.c_str(); SetTextColor(imglabel,inst->clrTextColor ); DrawTextEx(imglabel,text,-1,&test->rcItem,DT_LEFT,NULL); if(inst->blnBorder==true) DrawEdge(imglabel, &test->rcItem,BDR_SUNKENINNER | BDR_RAISEDOUTER,BF_RECT); …

0
103
Member Avatar for benphipps

Hello all, I am having trouble with my programming assignment in which we have to build a MIDI scale player. I am willing to send the assignment brief and my current to anyone willing to help. Cheers, Ben

Member Avatar for xtian170174
0
153
Member Avatar for cambalinho

when the form is activated: case WM_ACTIVATE: { if (wParam==WA_INACTIVE) { SetWindowText(inst->hwnd,"unactivated"); FormActivated = NULL; } else { SetWindowText(inst->hwnd,"activated"); FormActivated = inst->hwnd; } return 0; } break; when i create the timer: case WM_CREATE: { if(WindowMain == NULL || WindowMain ==GetDesktopWindow()) { WindowMain = HandleWindow; } SetTimer(inst->hwnd,JoystickTimer,150,NULL); SetTimer(inst->hwnd,KeyBoardTimer,150,NULL); SendMessage((HWND)lParam , …

Member Avatar for cambalinho
0
144
Member Avatar for Jazmine_1

Please help me I'm getting frustrated. #include <iostream> #include "unorderedArrayListType.h" using namespace std; int main() { int intList = new intList(8); int number; cout << "Enter 8 Integers: "; for (int count = 0; count < 8; count++) { cin >> number; intList.insertEnd(number); } cout << endl; cout << "Int …

Member Avatar for tinstaafl
0
199
Member Avatar for nightcrew

[QUOTE]Assume you have a int variable n that has already been declared and initialized. Its value is the number of integers that need to be read in from standard input and printed out in sorted (ascending) order, each on a line by itself. Furthermore, there are no duplicates in the …

Member Avatar for omgerg
0
3K
Member Avatar for Mahbeezzy

How do i write a program that computes the sum of all even numbers in a range forexample between 1 and 100

Member Avatar for TObannion
0
188
Member Avatar for VengefulToast

Hi fellow members, I have wrote two abstract classes, with the second inheriting from the first. However, I receive this error when I try to compile: "error C2143: syntax error : missing ',' before '<'." Will somebody help me out? Thanks! template <class DataType> class AbstactArrayClass { friend ostream& operator …

Member Avatar for mike_2000_17
0
282
Member Avatar for Ahmed_58

Write a nested loop for C++ to produce the following pattern if the user input is 5? ----1 ---22 --333 -4444 55555 (-) accounts for number of spaces before each number

Member Avatar for iamthwee
-1
109
Member Avatar for DS9596

Max and min come out wrong, they go to 0's when it outputs ? How do I fix, any solutions?? #include <iostream> #include <iomanip> #include <string> using namespace std; int main() { int x, y, z; int total; float average; //Read data into x, y, z void ReadData(int & x, …

Member Avatar for necrovore
0
1K
Member Avatar for DS9596

I did it like this and it somewhat works but I have problem with the middle name such as Barrack Hussein Obama. How do I make it so it ignores the middle name and just gives me the last name??? #include <iostream> #include <iomanip> #include <string> using namespace std; int …

Member Avatar for Moschops
0
170
Member Avatar for Hidayat_1

Every programming language provides different features to make coding task easy. One of the main objectives is to keep things simple as possible. You have studied C++ in this course and have learnt many different concepts e.g. input/output, if-else statements, loops, arrays, functions etc. Looping constructs are needed when a …

Member Avatar for deceptikon
0
164
Member Avatar for prabhjitsw

I am new to Dev C++ and i am creating a program of a game of snake. In Dev C++ the graphics open in WINDOWS BGI screen whereas the text gets shown in Text console(Dos). 1)i want to know how can i clear the WINDOWS BGI screen ? 2)how can …

Member Avatar for amit_26
0
1K
Member Avatar for RanyaAnwar

write a function to calculate the maximum number of four numbers notice that the four numbers will be entered by the user

Member Avatar for RanyaAnwar
0
141
Member Avatar for Advaith_1

Hey guys... I have Borland C++ compiler with version 5.02. The problem is that once I run the code, it makes and just flashes and disappears. I mean, in a simple 'hello world program', the program just cout 'hello world' and closes itself. I tried getch(); and it did work, …

Member Avatar for svn74
0
267
Member Avatar for alz3eem-94

Hi, Our teacher explains nothing, he expects us to learn from reading the book. I need help on how to start this assigment. I have attached the assigment.

Member Avatar for iamthwee
0
114
Member Avatar for phony

I need to check my code has all these requirements. The requirements for “main()” are: a. Use an object. b. Declare all required variables. c. Output user information. d. Input the radius 1 and radius 2 to be used to calculate the area of two circles. e. Use object Circle …

Member Avatar for NathanOliver
0
484
Member Avatar for biabia1
Member Avatar for daylighti

A language expert Mr. ABC objects the designers of C++ on the bases of following two arguments: A single looping construct is sufficient to cover all types of situations. Designers of C++ have not done any good with themselves and C++ programmers by making things complex with provision of three …

Member Avatar for Moschops
0
97
Member Avatar for DS9596

It lets me continue the loop but it won't let me enter a sentence the second time?? #include <iostream> #include <iomanip> #include <string> #include <cctype> using namespace std; int main() { char c, response; int Uc = 0, Dc=0, Vc=0, Wc=0; string vowels("aeiouAEIOU"); cout << "I can count the number …

Member Avatar for NathanOliver
0
430
Member Avatar for phony

I need to output the smallest number that is entered. I can't seem to figure out how to do it though. Thanks in advance. small.cpp #include <iostream> #include <algorithm> #include "arrayListType.h" using namespace std; int main() { arrayListType<int> intList(100); // int min(int first, int last); int counter; int number; cout<< …

Member Avatar for NathanOliver
0
397
Member Avatar for fedodedo12345

Create a C++ console applications to compile the following statistics on a list of integers:  minimum value;  maximum value;  median value;  arithmetic mean;  absolute deviation  variance (of a discrete random variable);  standard deviation (of a finite population);  mode (including multi-modal lists).  …

Member Avatar for rubberman
0
193

The End.