49,757 Topics

Member Avatar for
Member Avatar for MasterHacker110

I know that it generates a public key and then a private key. You encrypt with public and can only decrypt with private key. How is this algoritm going to work in a C++ program, how am i going to compute the public key and then the private key? Also, …

Member Avatar for np complete
0
189
Member Avatar for ktsangop

Hi everybody! I am having some trouble running a detached process using CreateProcess function in C++. I have been using the following function to spawn processes in c++ for years now havnig no trouble. I have used it with console applications, mfc apps, dialog based ... etc : StartProc(char *callprogram, …

Member Avatar for ktsangop
0
813
Member Avatar for shouvik.d

Hi, I have a Win32 Console Application which is throwing the Debug Assertion Failed! .. _CrtIsValidHeapPointer( pUserData ) and followed by a Debug Assertion Failed! .. _BLOCK_TYPE_IS_VALID(pHead->nBlockUse). After I did a Step by Step Debug strangely what I saw was it is throwing error once it is exittin the main …

Member Avatar for atoutsweb
1
1K
Member Avatar for Pyler

I wanted to write a simple program that uses classes but I've been running into errors. Anyone have a clue as to what is wrong with my code because I can't seem to figure it out. #include <iostream> #include <iomanip> #include <cmath> using namespace std; class cone{ private: double radius; …

Member Avatar for Rashakil Fol
0
248
Member Avatar for stevelance99

hey can anyone help me with the decrypt part...cant seem to get it to work.... #include <iostream> using namespace std; unsigned char s[256]; unsigned int i, j; void swap(unsigned char *s, unsigned int i, unsigned int j) { unsigned char temp = s[i]; s[i] = s[j]; s[j] = temp; } …

Member Avatar for WaltP
0
351
Member Avatar for MasterHacker110

I have this code and when ever i try to put in the value 'e' it doesnt want to take it, the program freses. #include <iostream> #include <string> #include <fstream> using namespace std; int encrypt(); int decrypt(); int phi, M, n, e, d, C, N, D, answer, p, q, s; …

Member Avatar for MasterHacker110
0
128
Member Avatar for godzab

Why can't I use inline functions with my setter method in c++. Here is the code: Main.cpp #include <iostream> #include "Employee.h" using namespace std; int main() { Employee h; h.setAge(30); h.setSalary(70000); h.setyearsOfService(5); h.printAllInfo(); return 0; } Employee.h #ifndef EMPLOYEE_H #define EMPLOYEE_H class Employee { public: inline int getAge(); int setAge(int …

Member Avatar for mike_2000_17
0
189
Member Avatar for MasterHacker110

I am writing a chatbot and it's database is going to be contained in a .txt file. Now i have this code: #include <iostream> #include <string> #include <fstream> using namespace std; int main() { string line; string uinput, resp; char key = line[0]; ifstream file("t.txt"); cout<<": "; getline(cin, line); while(getline(file, …

Member Avatar for MasterHacker110
0
206
Member Avatar for adnan18

#include<iostream> using namespace std; const int STACK_SIZE = 100; class stack { private: int count; // number of items in the stack int data[STACK_SIZE]; public: stack(); ~stack(); void push(const int item); // push an item on the stack int pop(void); // pop item off the stack }; stack::stack() // constructor …

Member Avatar for deceptikon
0
189
Member Avatar for daino

If I write a C++ program and compile it into an executable file AND, don't have to install the program, will I have trouble running that C++ written program on other platforms? Do portability issues accross different platforms only arise when I have to install the program? I'm currently breezing …

Member Avatar for deceptikon
0
342
Member Avatar for Sunshine2011

I would like to use GTKmm within Codeblocks, so that everytime a new project is created, the libraries are automatically included. I think I have to tell Codeblocks under Settings/Compiler and Debugger/Search directories and then under compiler the includefiles and under linker the libs. Is that correct?

0
60
Member Avatar for marreameathue

help i'm rather new at this but have some understanding but am having some probs with 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(8) : error C2144: syntax error : 'int' should be preceded by ';' 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(9) : error C2447: '{' : missing function header (old-style formal list?) i am makeing an number …

Member Avatar for phorce
0
372
Member Avatar for greatman05

This is homework. I am trying to implement a Dictionary ADT using a hash-table with a closed addressing scheme. The problem is that I'm required to make a hash table of Word classes. How can I do this? The class has to be templated. Here is what I have so …

0
171
Member Avatar for Vectorizm

I know it's a bad practice to post the same question on more than one help site (I posted it on Stackoverflow, but after some time your question loses its place on the "active" list and people stop reading it) but I'm really desperate here. So my question is: I …

Member Avatar for Vectorizm
0
386
Member Avatar for juljan30

calculate and display the square root of each value in NumArray then store it in an array called SquareNumArray. hi guys what is wrong with this code? #include <stdio.h> int main() { int numArrays[] = {2, 67, 23, 5, 7, 34, 14, 4, 8, 62}; int SqareNumArray[]; int i; for(i=0; …

Member Avatar for WaltP
0
849
Member Avatar for juljan30

calculate and display the average of all even values . #include<stdio.h> int main() { int numArrays[] = {2, 67, 23, 5, 7, 34, 14, 4, 8, 62}; int i, sum=0, ave=0; for(i=1; i<10; i++) { if(numArray[i]%2==0) printf("%d", numArray[a]); total+=numArray[a]; sum=sum+total; printf("the total of all even number is; %d", sum); } …

Member Avatar for WaltP
0
125
Member Avatar for juljan30

calculate and display the average of all even values . #include<stdio.h> int main() { int numArrays[] = {2, 67, 23, 5, 7, 34, 14, 4, 8, 62}; int i, sum=0, double ave=0; for(i=1; i<10; i++) { if(numArray[i]%2==0) { printf("%d", numArray[a]); total+=numArray[a]; } { sum=sum+total; printf("the total of all even number …

Member Avatar for WaltP
0
187
Member Avatar for juljan30

im not god in programing im stil new to it need help please find the MAX and MIN number then calculate and display the average [(MAX+MIN)/2] #include<stdio.h> int main(void) int NumArray[] = {2 ,67 ,23 ,5 ,7 ,34 ,14 ,4 ,8 , 62}; int max, min, i; double b; max=numArray[i] …

Member Avatar for WaltP
0
129
Member Avatar for juljan30

help please ^^ create another array, call it ArrayNum, then store the value of NumArray in reverse order. display the value in ArrayNum. #include <stdio.h> int main(void) { int numArrays[] = {2, 67, 23, 5, 7, 34, 14, 4, 8, 62}; int ArrayNum[10]; int a; for(a=o; a<10; a++) { ArrayNum[a]=numArray[9]; …

Member Avatar for phorce
0
135
Member Avatar for mpyap

I'm working on a problem to balance a checkbook. I've been struggling with it so I split it up into its components. I first made an array to store withdrawals. When I ran this program, everything ran fine. Now I'm trying to create a second array to store deposits. I …

Member Avatar for mpyap
0
172
Member Avatar for gizmo7008

I started this code, and it does encode the text, however it only does the first line of text and repeats it. It is also encoding spaces. #include <fstream> #include <iostream> #include <string> using namespace std; int main() { ifstream fin; string fileName; cout << "What file do you want …

Member Avatar for gizmo7008
0
170
Member Avatar for juljan30

int NumArray[]="2 ,67 ,23 ,5 ,7 ,34 ,14 ,4 ,8 , 62"; A. display all the value of NumArray with an ODD index B. display all the value in NumArray that are ODD C. calculate and display the average of all EVEN values D. create another array, call it ArrayNum, …

Member Avatar for VernonDozier
0
162
Member Avatar for juljan30

#include <stdio.h> int main() { int numArrays[] = {2, 67, 23, 5, 7, 34, 14, 4, 8, 62}; int i; printf("Odd Numbers in numArray:\n"); for(i=0;i<10; i++) { if(numArray[i]%2==1) { printf("%d ",numArray[i]); total += i; sum=sum+total; sum=sum+1; printf("There are %d odd numbers\n", sum); } } printf("even numbers in numArray;\n"); for(i=0; i<10; …

Member Avatar for Ancient Dragon
0
159
Member Avatar for marreameathue

help i'm rather new at this but have some understanding but am having some probs with 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(19) : error C2660: 'atotal' : function does not take 1 arguments 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(21) : error C2061: syntax error : identifier 'a' 1>c:\users\kysinden\documents\visual studio 2008\projects\real\real\test.cpp(23) : error C2660: 'atotal' : function …

Member Avatar for Ancient Dragon
0
266
Member Avatar for silvercats

#include <iostream> using namespace std; int answer(int x,int y); //function proto int mutab[10][12]; //two dimentional array declaration int main() { for (int i=0;i<1;i++) //this will fill 1-10 of the multiplication table { for (int h=0;h<10;h++) { mutab[h][i]=h+1; } } for (int i=0;i<10;i++) //this will fill 1x1,1x2,1x3 etc.. to ......10x11,10x12 { …

Member Avatar for silvercats
0
244
Member Avatar for juljan30

whats wrong with this one? i am trying to display the values in an odd index can any one help? int main() { int numArrays[] = {"2 ,67 ,23 ,5 ,7 ,34 ,14 ,4 ,8 , 62"}; int i; printf("A. Values of NumArray with Odd Index: \n"); for(i=0;i<=10; i++) { …

Member Avatar for juljan30
0
220
Member Avatar for adityasingh95

i wrote this program as an answer to a question given in my book but the output always displays incorrectly #include <iostream.h> #include <conio.h> #include <string.h> #include <stdio.h> class Clothing { //private data members char Code[5]; char Type[20]; int Size; char Material[20]; float Price; public: //constructor Clothing() { strcpy(Code,"NOT ASSIGNED"); …

Member Avatar for rubberman
0
138
Member Avatar for Div Intellect

Any pointers on how accented characters are implemented in Windows would be helpful. Goal - Ability to add accented characters(áéíóú) using keystrokes like ctrl + ' followed by a vowel and all other combinations that work on standard applications like MS Word, Text pad etc. My Findings till date - …

0
96
Member Avatar for rajatC

Well i use Dev-c++ 4.9.9.2 for programming..i m using it from last two years...recently i learned java and saw that all java programs are run through command prompt. I tried tha same in c++. i saved my program in dev-cpp/bin .but i am not able to do this..what is the …

Member Avatar for joaquince
0
3K
Member Avatar for Monster99d

Is there anyway I can make my static text appear with a delay? For example: Hello (Wait 1/5 of a second) How are you? etc... Any help would be greatly appreciated.

Member Avatar for Ancient Dragon
0
89

The End.