49,761 Topics
| |
> 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; … | |
#include <iostream> using namespace std; int main() { const int n = 20; int Array[n] = { 3, 5, 2, 9, 6, 12, 16, 11, 18, 4, 14, 8, 1, 15, 17, 7, 19, 13, 20, 10 }; cout << "Not sorted: \n"; for (int i = 0; i < … | |
I am in my first semester of computer program and this my third project. I am taking this class online so I do not have the in-class benefit of working with others. I have completed all of the code and the program works the way I believe it should. I … | |
Guys can anyone please explain to me the working of this function { "randamise()" }. | |
Hi all, can i store multiple data items inside a doubly linked list? is this valid? struct node { int marks; int regno; struct node *next; struct node *prev; }*start; If this is valid, how can i assign values to the individual data items? next->marks=5; next->regno=3456; will this work? | |
Hi all, I need help understanding a C++ problem. This is an assignment question. Create a base class ‘Account’ and two derived classes ‘Savings’ and‘Checking’. The ‘Savings’ and ‘Checkings’ information should be connected to each other using variable CREDITRATING. Transactions in any of those derived classes should be able to … | |
Hello, I am writting a code for class and I am having a hard time inserting my variables into my "cout". I know how to do it the long way but I know it has to be easier. Right know this is the portions I am working on: void displaySlpInt … | |
Hello. I need help with my assignment urgently. This is my assignment question and the follwoing is my code. It compiles but it doesnt give me the right output. 1. Run length encoding. Example: if the input is “AAABBCCCDEEFFA” the output will be “A3B2C3DE2F2A” 1. Input takes the form of … | |
say we have array[6] .. i want to ask user to enter 6 values to the array and if there is any repeated value the program will cout them .. which operation that i can use ? i thought about switch statement or if else condition and i have to … | |
who can help me on solvin this problem in c++ by not using math.h only a function; problem:x^n | |
#include <iostream> #include <fstream> #include <cstring> using namespace std; int va[20][2],i,j,iesire,intrare,st[21],as,ev,k=2,timp,mint=10000,d=0,t=0; float distanta,mind=10000; char comune[65][25]; struct intr { int t; float d; }v[65][65]; void init(int k,int st[21]) { st[k]=0; } void succesor(int k,int &as,int st[21]) { if(st[k]<65&&k<20) { st[k]++; as=1; } else { as=0; } } void valid(int k,int &ev,intr … | |
Hi all I have been struggling with this program for quite awhile. I can't seem to get the PRINTFREE and PRINTMATCH commands to work right. I seen a similar problem on here but I am still grasping at straws. Any help would be greatly appreciated. Here is the scenario for … | |
consider a vector R whose coordinates xyz are given by R1,R2 AND R3.the length of the vector R is calculated as R len=squareroot of R1Squared+R2squared+R3squared.write a c++ program to prompt the user for the vector coordinates values and calculate and display the vector R length.please help me with the code … | |
Hi so I am suppose to write/fix this code up so it produces a monthly bill for a store. This is what I have so far. I know its suppose to have functions but im just doing it first this way because i find it easier.I think theres something wrong … | |
Can someone explain polymorphsm to me? Or upload a program that include polymorphm. Need some examples. Thanku | |
Hi again everybody. I know there are some references to this kind of thing around the web but none of them are simple enough for me to understand. In my code below, I am trying to initialize a function pointer with a class member function but I'm not sure I … | |
Write a program in c++ that allows the user to enter amount in dollars and converts its value into PKR and vice versa. | |
why WS_CLIPCHILDREN style don't let the child control been clear? the WS_CLIPCHILDREN style avoid the flickers. but don't let clear the control :( why i can't clear the control(before WM_PAINT message)? | |
I know many if us are laughing seeing this question , but if i have taken some floating point value and I want if the result is integer it should have some decimal point answer eg - 1 can be integer number I want 1.0 to appear in my result. … | |
**Okay this is my first post and I am quite excited that how it will be recieved by the community. I have a long experience in C++ programming but never been a part of any community hence I believe that as a tyro, my mistakes will be ignored.** This post … | |
Which Sub Directory Save Source Code Of A File And How Many Files Are Created After Compilling? Answer Me Plz, With Details. | |
I was wondering if anyone can give me an idea on how i can modify this function to check for duplicates, if it contains a duplicate, since duplicates are not aloowed, output a message. Any help would greatly be appreciated. [code]template<class Type> void orderedLinkedListType<Type>::insertNode(const Type& newItem) { nodeType<Type> *current; //pointer … | |
Hello, I am wondering how I would access an element on a List? Is it something to do with the iterator? list<Element*> _children; _children.push_back(child); _children.push_back(child); For example, how would I access the "children" of this list? Thank you. |
The End.