49,761 Topics

Member Avatar for
Member Avatar for kazkikay12

i want to make a program that used to enter 7-digit number and determine the largest , smallest and the median and average of the seven number and as for know i tink i got it but there something wrong again in my program can you chek it out and …

Member Avatar for kazkikay12
0
138
Member Avatar for sbrohee

Hi everybody, In standard C++, two pair objects (pair <int, int>) are equal when the first and the second member of the pair are equal. Would it be possible to redifine the pair so that to pairs would be equal when only the second terms are equal? Thanks a lot …

Member Avatar for sbrohee
0
206
Member Avatar for raghamayee

HI every one, I need to do a course project for software architecture which should be implementable and is compulsoraily an ieee or acm paper. The areas given for us are: agile s/w developement,extreme programming,cloud computing,web services,generic programming,testing... can u guys suggest any thing in it

Member Avatar for raghamayee
0
100
Member Avatar for brazentongue

how can I input a console-entered string into multiple structure variables? I have the following structure: [code=c]struct MyTime {int hours, minutes, seconds;};[/code] and need to prompt a user to enter a time in format hours:minutes:seconds and then store that time into the structure directly i.e. I can't input a string …

Member Avatar for brazentongue
0
154
Member Avatar for tennis

[CODE]// pointers to base class #include <iostream> using namespace std; class CPolygon { protected: int width, height; public: void set_values (int a, int b) { width=a; height=b; } }; class CRectangle: public CPolygon { public: int area () { return (width * height); } }; class CTriangle: public CPolygon { …

Member Avatar for sfuo
0
123
Member Avatar for billowillo

Hello, I am new to this site and to C++. I have been following a tutorial on how to make a Tetris clone in SDL and C++ from the following site : [URL="http://www.aaroncox.net/tutorials/arcade/FallingBlocks.html"]http://www.aaroncox.net/tutorials/arcade/FallingBlocks.html[/URL] When i was finished going through it all and sorting through all the petty errors I had …

Member Avatar for billowillo
0
233
Member Avatar for Nathaniel10

An exercise is to write a program that generates random numbers within user specified limits. The program I wrote is as follows and it runs correctly. [code] #include "../../std_lib_facilities.h" void randnum(double lower, double upper, int n) // Generate 'n' random numbers uniformly distributed { // between lower and upper limits. …

Member Avatar for mrnutty
0
180
Member Avatar for Dinnerfortwo

My assignment is to use pointers to point at the highest and lowest temperatures in the array. I need to have 3 pointer variables and start them at the beginning of the array. Step the pCur through the array using a for loop and pCur++. Loop through the array looking …

Member Avatar for xuancong
0
199
Member Avatar for chamika.deshan

Hello I am in a question of assigning local scope pointers to global scope pinters. I have a code like this. [CODE]public : char* myValue; void process(TiXmlElement *element) { myValue= element->getText(); }[/CODE] But once the process function is returned value is garbage. So I did this. [CODE]public : char* myValue; …

Member Avatar for mike_2000_17
0
134
Member Avatar for LevyDee

I am practicing Win32 API again, and for some reason, I am getting an error. [code] #include <windows.h> #include <windowsx.h> #define WSIZE = 400 #define HSIZE = 400 LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { WNDCLASSEX …

Member Avatar for LevyDee
0
164
Member Avatar for VilePlecenta

[CODE]HMODULE g_hModule = GetModuleHandle( 0 ); HRSRC hRes = FindResource( g_hModule, MAKEINTRESOURCE( ID_DLL_MYDLL ), "ID_DLL" ); HGLOBAL hResource = LoadResource( g_hModule, hRes ); DWORD iResSize = SizeofResource( g_hModule, hRes ); BYTE* pData = ( BYTE* )LockResource( hResource );[/CODE] When I included a dll file into my project, I used: [CODE]fstream …

Member Avatar for mike_2000_17
0
320
Member Avatar for Gavin Harper

Hello, I am trying to read the raw interrupts from a USB mouse (Installed and functional) in a C++ application. I have read over LibUSB and WinUSB but WinUSB does not seem to play nice in Qt and LibUSB seems overcomplicated for what should be a simple task. I do …

0
11
Member Avatar for syd919

hello I need help with loading pages that have flash applications in them, my program works for just html pages, would anyone with qt knowledge plz help. TIA. here is my code: [code=c]#include <QApplication> #include <QWebView> #include <QUrl> #include <QWebSettings> int main(int argc, char *argv[]) { QApplication a(argc, argv); //QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, …

0
69
Member Avatar for itsmeisuru

Hi [code] #include "cv.h" #include "cxcore.h" #include "cxtypes.h" #include "highgui.h" int main() { CvCapture* capture = cvCreateFileCapture("RosewellBst.mp4"); cvNamedWindow( "Example2", 1 ); cvMoveWindow( "Example2", 100, 100); IplImage* frame; while(1) { frame = cvQueryFrame( capture ); if( !frame ) break; [COLOR="Red"]cvShowImage( “Example2”, frame );[/COLOR] char c = cvWaitKey(33); if( c == 27 …

0
59
Member Avatar for XodoX

Helllo, I am supposed to do the following: [quote] Mathematically, a set is said to be consists of well-defined elements. For instance, the following are well-defined sets. A = {1, 2, 3, 4, 5, 6, 7} B = {2, 3, 4, 8, 9} A set may be described using other …

Member Avatar for guru_iyer
0
142
Member Avatar for sana_moi

hi there! im trying to do a xor beetwin two cha but i coudl no there is my code: [code=c] String^ val2; String^ val3; String^ val1; String^ val; char *chval1; char *chval2; char *chval3; char *chval; char *chv; val1=GZMK1->Text;//GZMK1 is textbox val2=GZMK2->Text;//GZMK2 is textbox val3=GZMK3->Text;//GZMK3 is textbox chval1 = static_cast<char …

Member Avatar for Ancient Dragon
0
171
Member Avatar for John Sand

Hi! I'm new to C++ and am having a problem with saving a text file into a string. I'm using getchar() but only the last line of the rather long text file is saved into the string when used in different functions. In other words, if I include a "cout" …

Member Avatar for John Sand
0
185
Member Avatar for rishabbbh

[B]Can anybody tell me whats d problem..????[/B] [CODE] #include<iostream.h> #include<conio.h> void main() { clrscr(); int l,b,r,a; char ch,t,x; cout<<"******************----MAIN MENU----****************** \n"; cout<<"\n 1.Area of rectangle"; cout<<"\n 2.Area of square"; cout<<"\n 3.Area of circle"; { cout<<"\n Enter your choice"; cin>>ch; } rec:cout<<"\n Enter the Length and breadth"; cin>>l>>b; a=l*b; cout<<"\n Area …

Member Avatar for mike_2000_17
0
140
Member Avatar for alex k

programe to randomly generate store and display the age of N studnets (e.g ,18,24,38 etc).the minimum age is 18 and maximum age is 75.N should be equal to 9. 1.How we can intialise all the elements of the array to -1. 2.Randomly generate and store the age of N studnets …

Member Avatar for Ancient Dragon
0
102
Member Avatar for rinoa0424

Hi.. Can somebody help me with my project in c++? My project proposal that I had submitted is about Question and answer program. It is just like a game. I formulated many questions and their desired answer. The problem is, I want to randomize the question so that it will …

Member Avatar for Ancient Dragon
0
87
Member Avatar for krezty

Hi all, I can't seem to make the system() syntax work in my program.. I need to run a command from the command line using C++.. I tried a basic example and used this command [CODE]system("cls");[/CODE] instead of clrscr() and executed using my old c++ compiler. It doesn't work. Even …

Member Avatar for Ancient Dragon
0
67
Member Avatar for umesh314

// program implement the working of files simple stock // management #include <iostream.h> #include <fstream.h> #include <iomanip.h> #include <stdlib.h> #include <stdio.h> class stock{ int code; char name[30]; float cost; char flag; public: void getStock(); void putStock(); char getFlag(); void putFlag(char); int getCode(); }; int stock :: getCode(){ return code; } …

Member Avatar for Ancient Dragon
0
131
Member Avatar for lil.jeantle
Member Avatar for cheeseboy

Hi there. I am getting the errors below when I am trying to compile this code using DEV C++. [Linker error] undefined reference to 'CheckLeapYear'(int) [Linker error] undefined reference to 'CalcDayNumOfYear'(int) [Linker error] undefined reference to 'CheckLeapYear'(int) Id returned 1 exit status Please help. Below I have included my coding …

Member Avatar for JasonHippy
0
192
Member Avatar for bobsta

Hi I need to write data which I have successfully read in from a text file, to a new file. The original text file contains data for many objects. The read in data is stored using stl vectors in 3 nested objects: Structure, Polygon and Point i.e. a Structure contains …

Member Avatar for bobsta
0
161
Member Avatar for sabareesh

// Edit window property case WM_CREATE: hwndEdit = CreateWindow (TEXT ("edit"), NULL, WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL, 0, 0, 0, 0, hwnd, (HMENU) EDITID,(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), NULL); **word wrap calling** case ID_FORMAT_WORDWRAP: bFlag = !GetCheckedState(GetMenu(hwnd), ID_FORMAT_WORDWRAP, TRUE); if (bFlag) { SendMessage(hwndEdit, EM_SETWORDBREAKPROC, (WPARAM) 0, …

0
87
Member Avatar for shandow

#include <iostream> using namespace std; int main() { int i,j,k; int Matrix1[3][3] = { {1,2,3}, {4,5,6}, {1,2,3}, }; int Matrix2[3][3] = { {3,2,1}, {6,5,4}, {3,2,1}, }; int Matrix3[3][3]; cout << "Matrix 1: " << endl; for( i = 0; i < 3; i++) { for( j = 0; j < …

Member Avatar for sandeep.ank
0
93
Member Avatar for aikiart

Good morning, I've got a general question about overloading operators. Suppose you have a class that overloads the + operator and overloads the = operator, if you do something like this length3 = length1 + length2, will you automatically call both the overloaded + and = operator and if so, …

Member Avatar for aikiart
0
280
Member Avatar for chamika.deshan

Hello I am confused with an error saying. [QUOTE]Error 1 error C2664: 'const char *TiXmlElement::Attribute(const char *) const' : cannot convert parameter 1 from 'char *(__cdecl *)(void)' to 'const char *' c:\GameProject\TheGameProject\ContentManager\src\NodeWater.cpp 38 [/QUOTE] I have a method that returns a const char* as follows [CODE]class XMLNodeNames { public: static …

Member Avatar for chamika.deshan
0
193
Member Avatar for reolynda

// so guys this how i program about random walk of partilce..somehow... R ~ N^1/2 i got a huge different comparing simulation value and calculation(theoritical) .how i wanna to reduce different i got,,,/ N=number of steps... R= value from therom phitogoras R=(a^2 + b^2)^1/2..... [CODE]#include <iostream> #include <math.h> #include <time.h> …

0
69

The End.