49,761 Topics

Member Avatar for
Member Avatar for leo_7

``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 …

Member Avatar for happygeek
0
146
Member Avatar for markdean1989

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 …

Member Avatar for markdean1989
0
518
Member Avatar for Ahmad Imran
Member Avatar for NathanOliver
0
139
Member Avatar for itzlavanya

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 …

Member Avatar for JamesCherrill
-2
120
Member Avatar for man.chester.581
Member Avatar for tinstaafl
0
126
Member Avatar for it@61@sec

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 …

Member Avatar for it@61@sec
0
1K
Member Avatar for Haroon_3

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 …

Member Avatar for dilantha.prasanjith.96
0
471
Member Avatar for cypherscouter13

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 …

Member Avatar for Moschops
0
259
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
235
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
296
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
339
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
181
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
334
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
264
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
388
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
302
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
209
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
374
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
177
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
528
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

The End.