49,761 Topics
| |
``Bookkeeping You work for a company which mainly trades with 3 other companies. You record your balance in a file (you can still use cin or scanf to read or if you want you can read from "input.txt" file) with the following convention: Debit of Company A Credit of Company … | |
I wonder why this program does not do any changes to the text file that I am trying to modify. Scenario: My program uses the Fstream header file, I declared infile as IFSTREAM and outfile as OFSTREAM. I simply want to transfer data from infile to outfile. The data is … | |
What operation does this format specifier "\a" really perform | |
guys help me out i need programs in c++ on library management, like a program to manage book issue and a program to manage book deposits.. but they should be of basic level, with headerfiles like iostream,conio,string,stdio and stdlib u can use for,while and d while loops ☺ thanks please … | |
i want to insert at avl tree and search where can i get avl tree code from ? to study | |
I want to copy all the files from one directory to another using the fread() and fwrite()-statements. Some of these files are rather large in size, and that's why I want to calculate who long the transfer will take. (Later I will use this information to show a progress bar … | |
I want to convert a code from C to C++ , but some statements are very difficult to me , and I have not enough time to make the whole code in C++ from beginning, So anyone who can help me in this regard please comment me then I will … | |
I am using scientific linux. In the directory user/project/Build , after I ran 'make' to compile and link all the cpp files,I had no problems. But then, when I went to directory user/run/run.sh , which runs the project binary in user/project/Build/bin/project , I get a segmentation fault error. In the … | |
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 … |
The End.