- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
4 Posted Topics
In concatenate method, removal is being performed twice in a single loop. Shld be something like this [CODE] while (seqb.isEmpty() == false) { ElementType bnode; bnode = seqb.remove(); seqc.insert(bnode); tempseq.insert(bnode); } [/CODE] Also in remove method, delnode is being declared but not being assigned nething. Shld be like [CODE] if …
As can be observed, the cout statement is exected 2*2*2*2 = 16 times. Each time both a and b gets incremented twice. Therefore they are incremented 32 times. a gets incremented once more. That makes a increment 33 times and b 32 times. You need to enter such 'a' tht …
[CODE] #include <iostream> #include <string> using namespace std; int main() { char str[100]; int digits[10]={0}; cout<<"Enter a number or a string of numbers seperated by a space"<<endl; gets(str); for(int i=0;i<strlen(str);++i) if(str[i]!=' ') digits[str[i]-'0']++; cout<<endl; for(int i=0;i<10;++i) cout<<"Digit: "<<i<<"\tCount: "<<digits[i]<<endl; return 0; } [/CODE]
I wanted know if there's a way in c++ to know what character exists at a particular x,y coordinate. for eg: suppose i used [B]gotoxy(2,5)[/B] and my cursor is now at (2,5) and i want to know what character exists next to my cursor at (3,5). How can i know …
The End.
masterovpuppetz