- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 3
- Downvotes Received
- 4
- Posts with Downvotes
- 3
- Downvoting Members
- 4
9 Posted Topics
what you are doing is that in protoypes of the funtions you are telling to the compiler that in the funtion i will pass two input parameters from the main() but you are not passing it from the main to the funtion.. 1)intialze n1 and n2 in main(),take the values …
#include<iostream> //All rights reserved :p// #include<cstdlib> //programmer's Name:Syed Dawood // using namespace std; // NIck: UFOOOOOOOOOOO// int size=0; //size of array// int GreaterThan (int array [],int search_item); //your funtion's protoype// void main() { int search_item=0; //your search item// int count=0; //will hold final result// cout<<"Please enter thr size of array\n"; …
First of all check the 'for' loop in main()..actually you are making your fisrt mistake there,you are pointing the 'head' after the every itration to the new node created which is wrong..'head' should only point the fisrt node..so do it like this and debug it then for(int i=0;i<n;i++) { cout<<"Enter …
Good programming practice is that in inheritance you should keep the data members of parent class 'protected' means you should use proctected access specifier. This allows only the child classes to access the data members of parent class while keeping data memebers public kills the main working of OOP. Always …
There are lots of errors here.. First of all there is no main()..so plz tell us what do you want to do in this code then we will sort out the errors and will help you :)
1)you are using the same height for all the three vaults.. 2)declare three separate height variables for each vault e.g height1,height2,height3.. 3)change the data type of height,you are using bool which takes only true or false use float or double for height. 4)other common mistake is you are using same …
if you want to calculate the number of elements in string then follow this: void main() { int length=0; string arr; cout<<"Enter your string\n"; getline(cin,arr); //takes the user input// length=arr.size(); cout<<"The number of elements in the string are "<<length<<endl; }
The End.