Click here to Skip to main content
15,896,453 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: no border for my form Pin
zon_cpp22-Nov-08 1:45
zon_cpp22-Nov-08 1:45 
GeneralRe: no border for my form Pin
Randor 22-Nov-08 2:50
professional Randor 22-Nov-08 2:50 
QuestionContinuesPrinting not working please help me. Pin
Le@rner21-Nov-08 18:17
Le@rner21-Nov-08 18:17 
AnswerRe: ContinuesPrinting not working please help me. Pin
Rajesh Katalkar24-Nov-08 4:54
Rajesh Katalkar24-Nov-08 4:54 
QuestionProblem in debugging [modified] Pin
sen pao21-Nov-08 17:11
sen pao21-Nov-08 17:11 
AnswerRe: Problem in debugging Pin
David Crow21-Nov-08 18:04
David Crow21-Nov-08 18:04 
AnswerRe: Problem in debugging Pin
sen pao21-Nov-08 18:17
sen pao21-Nov-08 18:17 
AnswerNeed Help: How do I assign a Char* To System::String ^ Pin
niiAmoo21-Nov-08 12:35
niiAmoo21-Nov-08 12:35 
GeneralRe: Need Help: How do I assign a Char* To System::String ^ Pin
Saurabh.Garg21-Nov-08 16:43
Saurabh.Garg21-Nov-08 16:43 
GeneralRe: Need Help: How do I assign a Char* To System::String ^ Pin
niiAmoo21-Nov-08 20:47
niiAmoo21-Nov-08 20:47 
GeneralRe: Need Help: How do I assign a Char* To System::String ^ Pin
Saurabh.Garg22-Nov-08 3:16
Saurabh.Garg22-Nov-08 3:16 
QuestionApp depending on wrong DLL version Pin
KellyR21-Nov-08 10:45
KellyR21-Nov-08 10:45 
AnswerRe: App depending on wrong DLL version Pin
Randor 22-Nov-08 0:26
professional Randor 22-Nov-08 0:26 

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.