49,756 Topics

Member Avatar for
Member Avatar for khloud.alharazi

using switch statement writing a program for simpe calculator having functioinalities of finding addition,subtraction,division,square,cube and square root for any tow numbers obtained from user? `Inline Code Example Here`

Member Avatar for rubberman
0
68
Member Avatar for CodyOebel

Here's what I need to accomplish. So any help on this would be absolutely magnificent. I've programmed in WinAPI32, but for fast development I'm looking to use QT IDE in order to connect to an SQL database. I need to run queries on addresses for stored patience. The address is …

Member Avatar for rubberman
0
234
Member Avatar for BENTABET

I wrote a template class named "Tree<T>" in C++ which attributes are : - T data - std::vector<Tree*> sons; I wrote the basic methods consisting of writing and reading in those two attributes. Now, I'm writing methods that return the min and max depth. I have no compilation problems but …

Member Avatar for Duoas
0
293
Member Avatar for petrisor.ionel

//IteratorTablou.h #ifndef ITERATORTABLOU_H #define ITERATORTABLOU_H namespace Tema08 { class TestIterator { int *_crt; public: int IteratorTablou(int *crt = 0); }; void TestIterator(); } #endif // ITERATORTABLOU_H //IteratorTablou.cpp #include "IteratorTablou.h" namespace Tema08 { int TestIterator::IteratorTablou(): crt(_crt) { } void TestIterator() { } }

Member Avatar for NathanOliver
0
124
Member Avatar for cambalinho

i did these function for uppercase: string Upper(string text) { string result; result.resize(text.size()); for(int i=0; i<text.size(); i++) { if(text[i]>96 && text[i]<123) result[i]= text[i]-32; result[i]=text[i]; } return result; } but i'm getting the wrong results :( what i'm doing wrong?

Member Avatar for sneekula
0
336
Member Avatar for senait.kifle.127

Hello Guys, I have a bit of confusion about how to define a searching function.Here is what I wanted to do, I need to define the searching function which takes the name of a student as (stated in the argument) and returns a pointer to that or NULL if the …

Member Avatar for NathanOliver
0
180
Member Avatar for markdean1989

Hi I am working on a simple C++.Net project which will allow me to run another program (e.g., I. Ex., Word etc.). However, I can't seem to find any working codes online. Here are the codes I have found so far; ShellExecute(GetDesktopWindow(), "open", "c:\myTestFolder\myfile.exe", NULL, NULL, SW_SHOWNORMAL); requires the inclusion …

Member Avatar for markdean1989
0
326
Member Avatar for Mubeshier

#include "graphics.h" #include <stdlib.h> #include <stdio.h> #include <conio.h> #include<iostream> using namespace std; int main(void) { /* request autodetection */ int gdriver = DETECT, gmode, errorcode; int midx, midy; /* initialize graphics and local variables */ initgraph(&gdriver, &gmode, ""); /* read result of initialization */ errorcode = graphresult(); if (errorcode != …

Member Avatar for Duoas
0
1K
Member Avatar for cambalinho

ok. for use menu shorcuts i must create a table accelerator and change my message loop. but can i process the table accelerator without use the HWND?

Member Avatar for cambalinho
0
411
Member Avatar for Sunil_12

Hello All, I am working on writing a code to implement dictionary in C++. I have few functions to implement for my dictionary. Can someone please help me writing the definitions for my dictionary. Header file and cpp file is attached here. **Dict.h file is as below:** enum WordType{All, Animal, …

Member Avatar for Sunil_12
0
263
Member Avatar for Luisa_1

#include <iostream> using namespace std; double polynome3(double a0,double a1,double a2, double a3) ` double y[21]; double z[21]; for (int k=0;k<21;k++) { y[0]=1; y[1]=1; y[2]=1; /* Bernoulli's algorithm */ y[k+3]=-(((a1*y[k+2])+(a2*y[k+1])+(a3*y[k]))/a0); // cout<<y[10]/y[9]<<endl; } double alpha1=y[20]/y[19]; cout<< "The first solution is alpha1 = " << alpha1<<endl; double b0=a0; double b1=a1+alpha1*b0; double b2=-(a3/alpha1); …

Member Avatar for StuXYZ
0
2K
Member Avatar for Elias_5

using namespace std; int main() { int l; cout<<"Select level: easy--->1 medium--->2 hard--->3"<<endl; cin>>l; int zero(char [][3]); int fonction(char [][3]); char tab[3][3]; for (int i=0;i<3;i++) for(int j=0;j<3;j++) tab[i][j]=' '; int k; do{ k=fonction(tab); zero(tab); } while(k==2); if(k==1) cout<<"win"; if(k==-1) cout<<"loose"; if(k==0) cout<<"tie"; cin>>l; }//end of main int zero(char t[][3]) { …

Member Avatar for glenn_3
0
387
Member Avatar for exoruel

Good day guys, I would just like to share my code and wanted to do something about it. This code shows a loop inside a loop initializing a two-dimensional array named arr with elements [2] and [5]. Here's my code: #include <iostream> #include <conio.h> using namespace std; int main () …

Member Avatar for dbfud1988
0
300
Member Avatar for RAUF_2

**Quick Sort Using Double Linked lIst** This code does not sort the data in first approach.When i enter the sorting option two to three time then it sort the data.I think the problem is in recursive part.I am trying to sort the linkedlist in the same way as we done …

Member Avatar for Duoas
0
207
Member Avatar for cambalinho
Member Avatar for Elias_5

using namespace std; int main() { int l; cout<<"Select level: easy--->1 medium--->2 hard--->3"<<endl; cin>>l; int zero(char [][3]); int fonction(char [][3]); char tab[3][3]; for (int i=0;i<3;i++) for(int j=0;j<3;j++) tab[i][j]=' '; int k; do{ k=fonction(tab); zero(tab); } while(k==2); if(k==1) cout<<"win"; if(k==-1) cout<<"loose"; if(k==0) cout<<"tie"; cin>>l; }//end of main int zero(char t[][3]) { …

Member Avatar for rubberman
0
373
Member Avatar for Luisa_1

Hello everybody, I'm searching for a book or a documentation that includes all the librairies ,and their functions, of the C++ programming language. thx

Member Avatar for rubberman
0
176
Member Avatar for Henry Mark

DISPLAY THE FACTORS AND THEIR COUNT FOR A GIVEN NUMBER. SAMPLE DIALOGUES: #1 Type a number: 9 The factors of 9 are 1,3,9. There are 3 factors. #2 Type a number: 12 The factors of 12 are 1,2,3,4,6,12. There are 6 factors.

Member Avatar for rubberman
0
108
Member Avatar for ahmadali

pls i ask a some quistion help me write a progam that display pakistan 10 time by using for loop

Member Avatar for Henry Mark
0
167
Member Avatar for cambalinho

i'm using the HiliteMenuItem() for test if the mouse is above the menu item: int i=0; for(i=0; i<GetMenuItemCount(menuhandle); i++) { if(HiliteMenuItem(HandleWindow,menuhandle,i,MF_BYPOSITION) == true) { menuposition=(UINT)i; break; } } but i always get the number 0. heres how i detect the menu handle: case WM_INITMENUPOPUP: { menuhandle=(HMENU)wParam; return 0; } break; …

Member Avatar for cambalinho
0
525
Member Avatar for igli_1

***** **** *** ** * Can someone help me with this ^ pattern above? I only can do this one below *** ** *

Member Avatar for Maritimo
0
179
Member Avatar for Ola Loay

A company has 100 employees who receive a monthly salary ranged from 1000QR to 50000QR. We can represent the employee by an array of 100 elements as follows: double MonthS[100]; Q1: Write a for loop to fill-in the array with data. Q2: Calculate the average salary of employees. Q3: Find …

Member Avatar for Moschops
0
191
Member Avatar for amin234

record manager for computer inventory ,it consist of two modules application manager to allow user open database ,create,update. application program interface and interface store to get block ,write block.

Member Avatar for rubberman
0
57
Member Avatar for Ixiondbz

I want to learn step by step.I tried learning Html/css and it was fun(long time before) so dont remember. I basically have quite a lot of computer knowledge and how it works but no programming. I have recently started learning C++ from the book: "C++ Primer 5th edition". I am …

Member Avatar for pritaeas
0
143
Member Avatar for rose_2

what's the wrong with this code ?? ..it doesn't make the prossecc just typing the marks then nothing !! //program to get degrees of ten students in exam and compute the average exam degree of them #include<iostream> using namespace std; int main() { int mark,i; int average,sum=0; cout<<"enter 10 marks …

Member Avatar for rose_2
0
138
Member Avatar for fawadali

Write a C++ program that will print the pattern as shown below: Output: * *** ***** ******* ********* ********* ******* ***** *** *

Member Avatar for dbfud1988
0
191
Member Avatar for rose_2

In the following code : what's the difference between int and int& ? and what does it mean ?? i got something that n2 and n3 are changed only but not n1 and n4 !! is that related to (int& ) ?? #include <iostream> using namespace std; void change(int,int&,int&,int) int …

Member Avatar for rose_2
0
252
Member Avatar for MiicahLiim

Can you please help me do a asterisks of pyramid using the drawbar function, im new to c++ please help. Thank you in advance this is the drawbar function: the output should look like: * *** ***** ******* /*Overloaded drawbar() program.*/ #include<iostream.h> void DrawBar(int Length) /*Diplays a bar of asterisks …

Member Avatar for dbfud1988
0
422
Member Avatar for iqra_2

A bank in your town updates its customers’ accounts at the end of each month. The bank offers two types of accounts: savings and checking. Every customer must maintain a minimum balance. If a customer’s balance falls below the minimum balance, there is a service charge of $10.00 for savings …

Member Avatar for rubberman
-1
142
Member Avatar for Ahmed_57

The End.