49,757 Topics
| |
Please calculate water bill for Mr Adnan using your program,if last month he used 18 liters of water.Tariff for every liters used in RM0.24.Tariff of RM0.12 will charge for every liters used after the water usage exceeds 12 liters.The programwill be repeated until the user enter ‘0’ liter for the … | |
hey guyss..!! I'm having some difficulties working with strings (cstyle, object oriented strings). as this is something new for me so I'm not exactly familiar with functions of strings aswell.. write now i have a question for which i was making a solution but the code is missing something please … | |
#include<iostream> #include<string> using namespace std; int counterofanalog=0; int counterofdigital=0; int counterofsmartwatch=0; int num=0; //class for Genwatch class genWatch { private: int watch_id; string brand; int price; string colour; int date; public: genWatch() { watch_id=0; brand=""; price=0; } void adddata() { cout<<"Please Enter Watch ID:"; cin>>watch_id; cin.ignore(); cout<<"Please Enter Watch Brand:"<<endl; … | |
Hi, I'm trying to learn templates. I want to pass strings and integers via objects. I made it as a template because my program should support both strings and integers. // Main Function int main() { string element; library <string> comics; cout << "\nPlease type in the element: \n"; cin … | |
i have a problem with my dev c++ whenever i write a source code firstly it shows output then i made amendments in it after that it is not showing me any output. . . can anyone tell me what is the actual problem??? | |
I continuously get this warning whenever a constructor delegates to another constructor within the containing type, having virtual bases. `warning C4100: '$initVBases' : unreferenced formal parameter` It's the same warning as when a parameter or local goes unused, it in this case it seems to be referring to the virtual … | |
Hi guys I need some help in sorting array in descending and ascending order. I already have my ascending program but it does not work when I put codes for descending.. | |
Hey guys I'm having trouble on placing my loops I actually want to make a square and I dont know how to manipulate my own placement because I am used to gotoxy(); and I think it only works in TurboC++... As of now I am using DevC++ .. Can you … | |
I not know about 2d array Please help me to solve this problem......................... Write a program that declares a 2-D array of 7 rows and 2 columns. The rows represent one day of the week. The first column is the maximum temperature of that day and the second columns is … | |
Hi Im stuck doing these in 2d arrays also I dont really get whats its asking for. If someone could help me out I would appreciate it a lot. Find the average for July over 4 years= 87.5 Find the average for the first 6 months in the first year= … | |
A recent assignment requires me to create a pseudocode for a game of tic tac toe. And I'm a bit lost. Here's the details: ++++++++++++++++++++++++++++++++++++++ Design a program that allows two players to play a game of tic-tac-toe. Use a two-dimensional String array with three rows and three columns as … | |
please , can you help to find the formulas accourding to the results in the pictures ? ![111.PNG](/attachments/large/4/db77c2b3808787166a0324578c0b38ba.PNG "align-center") The first formula is based on number of kilometers you plan to go. The expense for this formula is computed as follows: - For the first 500 kms, the cost of … | |
Can I ask on how to use the goto statement because here in my program I am using Function and inorder to go back from the top I use goto statement.. Why isn't it working?? #include<iostream> using namespace std; void rankE(){ cout<<"Rank: E "<<endl<<endl; } void rankD(){ cout<<"Rank: D "<<endl<<endl; … | |
Hi, I am trying to explore PoDoFo for parsing PDF files. So I tried to build it on Visual studio following the procedure in the ReadMe.html that came with the package. So i used the following cmake command: cmake -G "Visual Studio 9 2008" -DCMAKE_INCLUDE_PATH="D:\PoDoFo_VS\CmakeRefer\ft245\freetype-2.4.5\include;D:\PoDoFo_VS\CmakeRefer\libjpeg\build\include;D:\PoDoFo_VS\CmakeRefer\libjpeg\build;D:\PoDoFo_VS\CmakeRefer\zlib\build\include" -DCMAKE_LIBRARY_PATH="D:\PoDoFo_VS\CmakeRefer\ft245\freetype-2.4.5\objs\win32\vc2013;D:\PoDoFo_VS\CmakeRefer\libjpeg\build\lib;D:\PoDoFo_VS\CmakeRefer\libjpeg\build;D:\PoDoFo_VS\CmakeRefer\zlib\build\lib" -DPODOFO_BUILD_SHARED:BOOL=FALSE -DFREETYPE_LIBRARY_NAMES_DEBUG=freetype245MT_D -DFREETYPE_LIBRARY_NAMES_RELEASE=freetype245MT .. … | |
So I have to build a program that shows the outcome of an imaginary battle between two groups of animals. I'm having an issue with making the user select the type of the animal. I have all my data e numerated, but I can't seem to get cin>>type to work. … | |
Hi, I have a C++ code running OpenGL GUI (CEGUI), I need to wrap this window inside a C# Application. I guess I will compile the C++ as a dll, and add entry points for the C# app. What is the preffered way to do this? I thought of these … | |
I have been hitting a brick wall with this program. I am new at c++ and the text only shows really really easy examples. the deposit function works fine, but i am running into problems with the checking function and doing the final output. 1. when i type in 'C … | |
my Region bitmap way uses the CreateRectRgn() and CombineRgn() functions. my question is: is more faster use the CreatePolygonRgn() with POINT array object? | |
how can i copy the parent background(DC) control to child control DC? | |
Hello ! I have a task that is difficult for me to handle. The task is: Create recursive function that can be generate a string of length N (N <= 100), formed by the letters 'A', 'B' and 'C' and does not containing two identical adjacent substring. For example: enter … | |
#include<iostream> using namespace std; int add(int x,int y) { int ans=0; int carry=0; for(int i=0;i<=31;i++) { int p = (1<<i)&x; int q = (1<<i)&y; int r = p ^ q; r = r^(carry<<i); ans = r | ans; if(p&q || p&(carry<<i) || q&(carry<<i)) carry = 1; else carry =0; } … | |
Hi I just wanna know what is wrong in my program I'm a little bit confused using FUNCTION... Thank you... #include<iostream> #include<cstring> using namespace std; struct Name{ char* names; int grades; }; int main(){ int a, Jo; Name John; Name Alvin; John.names; John.grades; Alvin.names; Alvin.grades; std::cout<<"Student Name: "; cin>>John.names; cout<<endl; … | |
Not sure how to put my code in to excel. 1.#include <iostream> 2.using namespace std; 3. 4.int main() 5.{ 6. const int n = 20; 7. int Array[n] = { 3, 5, 2, 9, 6, 12, 16, 11, 18, 4, 14, 8, 1, 15, 17, 7, 19, 13, 20, 10 … | |
> So basically I just started learning to use Windows forms with c++. I am creating an inventory/point of sale system. I have done the inventory part but now I want to do the sales part but I'm not sure how to go about it. I want to create a … | |
#include<iostream> usingnamespacestd; constint MAX_SIZE = 200; int compare(intone[], inttwo[], intsize) { for(inti = 0; i<size;i++) if(one[i] <two[i]) return -1; elseif(one[i] >two[i]) return 1; return 0; } void main() { intN; cout<<"Enter the array size: "; cin>>N; //size must be less than MAX_SIZE int one[MAX_SIZE]; int two[MAX_SIZE]; cout<<"Ente the elements of … | |
Create a program that contains the following functions: -create two dynamic stacks with integer data contained in an external file. -Sort items in stacks by the selection sort method -Record outputs in an external file. Main function main ()-menu selection functions and check the status of the data I dont … | |
Hi there... I'm having some difficulties in my studies. We were asked by our teacher to make a program on how to calculate Frequency Distribution Table and also with the calculations of Mean, Median, and Mode. Can I ask some help ?? | |
**Hi! How do I put the random number generated in an array so that I can make each number in it unique? Thanks! :)** #include <cstdlib> #include <ctime> #include <iostream> using namespace std; int generateRandomNo(int randomNumber){ srand(time(0)); randomNumber = rand()%10000; return randomNumber; } int main(){ int randomNumber; cout << generateRandomNo(randomNumber); … | |
I really don't know what the problems occurs inside this coding. I do not have any idea what this error means. If anybody can help me I would be so grateful. #include<string> #include<iostream> #include<stdlib.h> using namespace std; int num=1; int counterforanalog=0; int counterfordigital=0; int counterforsmartwatch=0; class watch private: int watch_id; … |
The End.