Try knowing about dynamic array creation or if you still want to use static ones, in the very start, try initializing your array with null and then after getting input from user, search through the...
Type: Posts; User: Mr.777
Try knowing about dynamic array creation or if you still want to use static ones, in the very start, try initializing your array with null and then after getting input from user, search through the...
And what is this? Your code?
D is declared no where.
1. getDegree() returns an integer but you aren't storing it anywhere. Not an error but it's against the rules.
2. Same is the case for getScale().
3. convertFtoC (float) is returning and accepting...
I want Elysia to comment about this.
Elysia can better explain everything about it.
Try it and if got any problems, post here. And read homework policy.
And what are the problems with this code?
Yes my typing mistake. it will be numbers[k++]. Sorry.
Add to front and delete from last.
Now simple do;
int temp=0;
for(int index=0;index<k;index++)
{
temp=numbers[k];
numbers[k]++=numbers[index];
numbers[index]=temp;
}
1. Depends upon the function you've implemented for your class stack.
2. Depends upon the function you've implemented for your class stack.
3. Depends upon the function you've implemented for...
I think you will have to use one temporary variable.
I want to ask one thing, that you aren't allowed to use even a single variable except the specified ones?
Hahaha... For showing only, you can do;
for(int i=k;i<lengthOfArray;i++)
{
cout<<numbers[i];
}
for(int j=0;j<k;j++)
{
cout<<numbers[j];
Show your code.
Well, you've declared double item_cost but you are trying to use it like a pointer. double is a datatype that doesn't mean that by doing this, you are able to declare a pointer. If you want to create...
You need to code all this inside main function.
Remember the difference between single pointer and the double pointer.
Pointers are just to store the addresses and nothing else.
Single pointer stores the address of a single variable or array or...
For your explaination: Suppose i do
float x=2.24;
2.24 is actually treated as double but implicit type cast will convert it into float.
So if you want to keep it float,
float x=2.24f;
1. Do you really think, it is sorting efficiently???
2. What is l and r??? No initialization... so expecting garbage or 0 for both.
3.
if(l>=r)
{
printf("element not found");
...
Okay for your ease, it's just a little help, but you can move forward while getting this little idea if you really want to do.
So,
You should know that integer (int) is a primitive data type...
1. From where the variable fileline is accessed? (As i can't see through your whole code, anyways let i suppose it's initialized or set somewhere.)
2. Okay, let take a case.
e.g. Your line array...
Use std::string or std::vector(preferable)
Or compare them index by index.
First, these are not multidimensional arrays but only single arrays.
Definiterly, crash..... Boooooooooommmmmmmm!!!
No it will not go back to zero, a runtime error.
I first enter 1 and then 4.
Now check your pointer condition....
Your pointer is not pointing to any where, means it's a dangling pointer.
Now, start handling it...
Good luck