Click here to Skip to main content
15,910,661 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: context menu.? Pin
Nishad S27-Jan-09 18:11
Nishad S27-Jan-09 18:11 
GeneralRe: context menu.? Pin
sam_psycho27-Jan-09 18:24
sam_psycho27-Jan-09 18:24 
GeneralRe: context menu.? Pin
Nishad S27-Jan-09 18:31
Nishad S27-Jan-09 18:31 
GeneralRe: context menu.? Pin
sam_psycho27-Jan-09 18:35
sam_psycho27-Jan-09 18:35 
Questionquestion about my project.... Pin
arad.moradi27-Jan-09 9:55
arad.moradi27-Jan-09 9:55 
AnswerCP Ignore this post (impatient user, homework, double posting) Pin
Garth J Lancaster27-Jan-09 11:22
professionalGarth J Lancaster27-Jan-09 11:22 
QuestionRe: question about my project.... Pin
David Crow28-Jan-09 16:41
David Crow28-Jan-09 16:41 
Questionquestion about my project....... Pin
arad.moradi27-Jan-09 9:39
arad.moradi27-Jan-09 9:39 
i don't know what is the reason of of error.
i write it with c++ & i send what is it about.
it is the code:
<big>#include <iostream>
#include <string>
#include <cctype>
using namespace std;
class cart{
public:
	cart(char a[2]="paq"){
		cout << a[0]<<a[1]<<a[2];};
	char left()
	{//int i;
		char a[2];
	swap(a[0],a[1]);
	//i++;
		for (int b=1;b>=2;b++)
			cout << a[b];
	return 'L';
	};

    char right()
	{//int i;
		char  a[2];
	swap(a[2],a[1]);
	//i++;
		for (int b=1;b>=2;b++)
	cout << a[b];
	return 'R';
	};

    char en()
	{//int i;
		char  a[2];
	swap (a[0],a[2]);
	//i++;
		for (int b=1;b>=2;b++)
	cout << a[b];
	return 'E';
	};
	char fo()
	{ //int i;
//	i++;
		char  a[2];
		for (int b=1;b>=2;b++)
	cout << a[b];
	return 'F';
	};
};

int main ()
{cout << "swap the cart juker1,ace,juker2" <<endl;

char b[50];char a[2];a[0]='p';a[1]='a';a[2]='q';
for (int i=1;i>=50;i++){
	cin >>b[i];
	if (b[i]='.') break;
};
	//cart y("p","a","q");
	cart x;
	for (int i=1;i>=50;i++){
	if ((b[i]='l')|(b[i]='L'))  x.left(); 
	else if ((b[i]='r')|(b[i]='R')) x.right();
	else if ((b[i]='e')|(b[i]='E')) x.en();
	else if ((b[i]='f')|(b[i]='F')) x.fo();
	};}</big>

and it is what i want to do:
    
He has a table with three face-up cards in a row: two jokers and one ace, with the ace in the middle. After you make a small wager, he turns the cards face-down and begins to manipulate the cards, swapping cards two at a time. After he completes the swaps, you are then to guess which card is the ace.
The series of card swaps will be given to you in order as a String swaps, containing only the characters 'L', 'R', 'E', and 'F'. swaps[0] indicates the first swap. The 4 characters indicate the following moves:
L: swap the left and middle cards
R: swap the right and middle cards
E: swap the cards on the ends (the left and right cards)
F: fake swap (no cards actually change position)
Write a method that returns the final position of the ace, after all the swaps have been performed. Your method should return "L" if the left card is the ace, "R" if the right card is the ace, and "M" if the ace is in the middle.
thanks for attention
AnswerRe: question about my project....... Pin
Reagan Conservative27-Jan-09 11:09
Reagan Conservative27-Jan-09 11:09 
AnswerRe: question about my project....... Pin
Garth J Lancaster27-Jan-09 11:17
professionalGarth J Lancaster27-Jan-09 11:17 
QuestionUAC - Showing fake Shield icon on the Exe Pin
WindowsPistha27-Jan-09 7:34
WindowsPistha27-Jan-09 7:34 
QuestionRe: UAC - Showing fake Shield icon on the Exe Pin
bob1697227-Jan-09 14:12
bob1697227-Jan-09 14:12 
AnswerRe: UAC - Showing fake Shield icon on the Exe Pin
WindowsPistha29-Jan-09 18:08
WindowsPistha29-Jan-09 18:08 
QuestionMFC GUI Pin
bhanu_850927-Jan-09 2:31
bhanu_850927-Jan-09 2:31 
QuestionRe: MFC GUI Pin
Nishad S27-Jan-09 2:50
Nishad S27-Jan-09 2:50 
AnswerRe: MFC GUI Pin
bhanu_850927-Jan-09 3:12
bhanu_850927-Jan-09 3:12 
GeneralRe: MFC GUI Pin
Nishad S27-Jan-09 3:24
Nishad S27-Jan-09 3:24 
GeneralRe: MFC GUI Pin
bhanu_850927-Jan-09 3:28
bhanu_850927-Jan-09 3:28 
GeneralRe: MFC GUI Pin
Nishad S27-Jan-09 3:51
Nishad S27-Jan-09 3:51 
GeneralRe: MFC GUI [modified] Pin
Iain Clarke, Warrior Programmer27-Jan-09 3:30
Iain Clarke, Warrior Programmer27-Jan-09 3:30 
AnswerRe: MFC GUI Pin
Maximilien27-Jan-09 3:29
Maximilien27-Jan-09 3:29 
GeneralRe: MFC GUI Pin
bhanu_850927-Jan-09 3:38
bhanu_850927-Jan-09 3:38 
QuestionChange selection in CListCtrl with keys? Pin
bosfan27-Jan-09 0:45
bosfan27-Jan-09 0:45 
AnswerRe: Change selection in CListCtrl with keys? Pin
Nishad S27-Jan-09 2:51
Nishad S27-Jan-09 2:51 
GeneralRe: Change selection in CListCtrl with keys? Pin
bosfan27-Jan-09 3:23
bosfan27-Jan-09 3:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.