49,756 Topics
![]() | |
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` | |
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 … | |
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 … | |
//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() { } } | |
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? | |
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 … | |
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 … | |
#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 != … | |
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? | |
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, … | |
#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); … | |
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]) { … | |
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 () … | |
**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 … | |
using the WM_KEYUP, can i see if the shift\control\alt keys was uped too? | |
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]) { … | |
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 | |
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. | |
pls i ask a some quistion help me write a progam that display pakistan 10 time by using for loop | |
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; … | |
***** **** *** ** * Can someone help me with this ^ pattern above? I only can do this one below *** ** * | |
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 … | |
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. | |
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 … | |
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 … | |
Write a C++ program that will print the pattern as shown below: Output: * *** ***** ******* ********* ********* ******* ***** *** * | |
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 … | |
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 … | |
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 … | |
The End.