Click here to Skip to main content
15,918,624 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to change the caption of AfxMessageBox () ? Pin
kapardhi22-Nov-08 1:54
kapardhi22-Nov-08 1:54 
AnswerRe: How to change the caption of AfxMessageBox () ? Pin
Randor 22-Nov-08 2:37
professional Randor 22-Nov-08 2:37 
AnswerRe: How to change the caption of AfxMessageBox () ? Pin
Graham Bradshaw23-Nov-08 2:43
Graham Bradshaw23-Nov-08 2:43 
QuestionInternet Connection Problem Pin
Dhiraj kumar Saini22-Nov-08 1:07
Dhiraj kumar Saini22-Nov-08 1:07 
Questionplease help on operators in matrix class Pin
Jorge22-Nov-08 0:35
Jorge22-Nov-08 0:35 
QuestionRe: please help on operators in matrix class Pin
CPallini23-Nov-08 9:45
mveCPallini23-Nov-08 9:45 
AnswerRe: please help on operators in matrix class Pin
Jorge23-Nov-08 13:40
Jorge23-Nov-08 13:40 
QuestionHow to open .bmp file in paint in MFC? Pin
AnithaSubramani22-Nov-08 0:11
AnithaSubramani22-Nov-08 0:11 
AnswerRe: How to open .bmp file in paint in MFC? Pin
Randor 22-Nov-08 0:35
professional Randor 22-Nov-08 0:35 
AnswerRe: How to open .bmp file in paint in MFC? Pin
Code-o-mat22-Nov-08 0:38
Code-o-mat22-Nov-08 0:38 
AnswerRe: How to open .bmp file in paint in MFC? Pin
Hamid_RT22-Nov-08 2:19
Hamid_RT22-Nov-08 2:19 
GeneralRe: How to open .bmp file in paint in MFC? Pin
AnithaSubramani22-Nov-08 2:28
AnithaSubramani22-Nov-08 2:28 
GeneralRe: How to open .bmp file in paint in MFC? Pin
David Crow22-Nov-08 3:34
David Crow22-Nov-08 3:34 
GeneralRe: How to open .bmp file in paint in MFC? Pin
Hamid_RT22-Nov-08 20:30
Hamid_RT22-Nov-08 20:30 
QuestionHow can Release memory controls? Pin
Le@rner21-Nov-08 23:07
Le@rner21-Nov-08 23:07 
AnswerRe: How can Release memory controls? Pin
Randor 22-Nov-08 0:16
professional Randor 22-Nov-08 0:16 
Questionpascal to c code converstion .. Pin
Member 403833521-Nov-08 22:33
Member 403833521-Nov-08 22:33 
AnswerRe: pascal to c code converstion .. Pin
David Crow22-Nov-08 3:29
David Crow22-Nov-08 3:29 
GeneralRe: pascal to c code converstion .. Pin
Member 403833522-Nov-08 5:18
Member 403833522-Nov-08 5:18 
QuestionRe: pascal to c code converstion .. Pin
David Crow22-Nov-08 10:13
David Crow22-Nov-08 10:13 
AnswerRe: pascal to c code converstion .. Pin
Member 403833522-Nov-08 22:02
Member 403833522-Nov-08 22:02 
well i saw th poblem there i rewrite the code but stil i have same problem when i use 'o' or any letter after it will shift outside of printable chars. of ASCII how can i fix that??

#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <cctype>
#include <cstdlib>
char text[256];  /* logika edw prepei na balw mia size of me malloc gia na doulepsei..anti gia to 256 */
int m,c,men;

/*Encrypt*/
void cez(char *Text)
{
char key[20];
printf("%s\n", "dwse text ");
gets_s(Text,256);
printf("%s\n", "dwse to klidi kriptografisis");
gets_s(key,20); //pairnw se string to kleidi kriptographisis

for(int i=0; key[i] !='\0'; i++)//elegxw an to kleidi einai arithmos
{
	 if(!isdigit(key[i])) 
	 {
		 printf ("Your key is not number! Try again \n");
		 return;
	 }
}
int k = atoi(key);//metatrepw to key se akaireo arithmo
for(m = 0; m < strlen(text); ++m)
   {
       c = text[m] + k;
       if(c > 256) c -= 256;
       Text[m] = c;
    }
}
/*Decrypt*/
void desh(char *Text)
{
char key[20];
printf("%s\n", "dwse to klidi apokriptografisis");
gets_s(key,20);//idia me parapanw
for(int i=0; key[i] !='\0'; i++)
{
	 if(!isdigit(key[i])) 
	 {
		 printf ("Your key is not number! Try again \n");
		 return;
	 }
}
int k = atoi(key);
for(m = 0; m < strlen(text); ++m)
{
c = Text[m] - k;
if(c < 256) c+=256;
Text[m] = c;
}
}
int main()
{     printf("=======================\n KRYPTOGRAFISH \n=======================\n");
	  cez(text);
	  printf("%s \n", text);
	  printf("=======================\n APOKRYPTOGRAFISH \n=======================\n");
	  desh(text);
	  printf("%s \n", text);
   
}

GeneralRe: pascal to c code converstion .. Pin
David Crow23-Nov-08 12:53
David Crow23-Nov-08 12:53 
QuestionDrag & drop between tree controls [modified] Pin
AnithaSubramani21-Nov-08 19:09
AnithaSubramani21-Nov-08 19:09 
AnswerRe: Drag & drop between tree controls Pin
Code-o-mat22-Nov-08 9:36
Code-o-mat22-Nov-08 9:36 
Questionno border for my form Pin
zon_cpp21-Nov-08 19:05
zon_cpp21-Nov-08 19:05 

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.