- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
8 Posted Topics
Use && instead of || in if condition - (*vendorName != 'q' && *vendorName != 'Q')
Your sort function doesn't look correct. Try bubble sort - [CODE] for(i=0;i<=list_size-1;i++) { for(j=0;j<=list_size-2;j++) { if(list[j+1]<list[j]) { swap } } }[/CODE]
Basically what this code is doing is that -- In first step you are putting some value in name and norms[0] pointing to name. In second step you changing value in name and norms[1] now also points to name. Since both norms[0] and norms[1] points to name new value is …
You should delete only when you are done with this memory area.That means you can not delete in overloaded operator function. In main you will recieve this memory address in another pointer.There if you are not passing it further to any other function and you are sure you won't use …
Your manual and file functions have to return because when you are calling function Unknown, both of your arrays known and unknown have garbage value in them.
You have two options First -- make a enum to store all operators . enum oper {add =1, sub=1, div=2, mu=3}; Now make link list 'stack' to store these enums, and you can do like this - if(stack->op > stack->next->op); As you can see you can also give same weight …
[code=cplusplus] #include<iostream> #include<list> using namespace std; int main() { list<int> dob; for(int i=0;i<5;i++) { dob.push_back(i); } for(int i=0,list<int>::iterator itr=dob.begin();i<3;itr++,i++) cout<<*itr; return 0; } [/code] errors-- test.cpp: In function `int main ()': test.cpp:17: `iterator' specified as declarator-id test.cpp:17: extraneous `int' ignored test.cpp:17: `int list<int, allocator<int> >::iterator' is not a static member …
The End.
vivekc++