49,761 Topics
| |
can anyone give me the source code of CAST 128 encryption algorithm written in c++ language?... I really need this for my thesis. | |
Hi everybody, I am trying to make the real substr function in c++ which its a member of String Class. Here what I have done: [code]void substr(char x[], int n, int n2){ char *p; p = x; for(int i=0; i<=n2; i++) *(p+i) = *(p+i+n); *(p+n2) = '\0'; // I can … | |
I need to write a program that implements the reverse function using a recursive solution by removing the first character, reversing a sentence consisting of the remaining text, and combining the two. I have written this code below. I have two problems. 1, I am getting a fatal error on … | |
Question 1 Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping options, each with specific costs associated. Create an inheritance hierarchy to represent various types of packages. Use Package as the base class of the hierarchy, then include classes TwoDayPackage and OvernightPackage that derive from … | |
Hi everyone, I just started doing C++ coming from a java background. I'm writing a discrete event simulator at the moment and need to put 'job' objects into a priority queue and sort them by their next job time- i.e. shortest job time first. I first tried doing the following: … | |
When I try to compile my project, I get 138 errors about the include files in VC++ 2008: [url]http://pastebin.com/yfp85sMF[/url] Thanks in advance, ~Asian | |
Error 1 error LNK2019: unresolved external symbol "void __cdecl calcCelsius(double)" (?calcCelsius@@YAXN@Z) referenced in function _main | |
Let’s say you have few functions: func_1(arg1, arg2, arg3) , func_2 (arg1, arg2) and func_3 (arg1, arg2, arg3). All 3 performing similar steps: func (arg1, arg2, arg3) { Read line from the file validate_func() Store results into arg3 } So my question is – what would best way to approach … | |
I'm self studying from the book, C++ Primer Plus Fifth Edition, by Stephen Prata. The following relates to Chapter 13, Page 699, Programming Exercise #4. One task is to write the derived class method definitions based upon the given prototypes. The following are the said prototypes. [CODE="cpp"]class Port { private: … | |
Hello, I'm trying to create my own game engine, and ran into a problem with nested classes. Currently, I only have one class that has any methods: [CODE] #ifndef WINDOWMANAGER_H_ #define WINDOWMANAGER_H_ #include <SFML/Graphics.hpp> #include <string> namespace tnt { class Engine { public: class GeneralCore { public: class WindowManager { … | |
For a function protoype header can one be double while the other one is void? I'm trying to make the void displayPayment function work, but am a little lost. Should I turn the carPrice, Rebate, ect.. into void functions in the prototype, or can they work without doing that? Thanks … | |
hey all so here's my problem: im just trying to learn a little opencv and ive been stuck at this for a while. When i run the following code, i get a runtime error " An application has made an attempt to load the C runtime library incorrectly ". This … | |
Al salamo Aleekom And Hi... Thank you for reading my topic... -------------------------------------------- Today and yesterday,Suddenly .... i get a problem when i writing any C++ code in ecplise i tried most of my previous codes but it give same problem...! Can anyone help?! here is the code: [CODE]#include <iostream> using … | |
where can i find out a detailed information about [B]How to write a header file[/B] ? | |
[CODE]#include <iostream> #include <cstdio> #include <iomanip> #include <cstdlib> #include <ctime> using namespace std; int main() { int rNumber = 0; int uNumber = 0; const int maxNum = 10; const int minNum = 1; const int range = maxNum - minNum; int counter = 0; //declare random formula srand((unsigned int)time(NULL)); … | |
Hi! I have a problem with a bit of code i'm writing. What i want to do is: In the header file: [code=c] private: int board[16]; [/code] And in the .cpp file constructor [code=c] ScoreBoard::ScoreBoard() { int board[16]={-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0}; } [/code] the compiler doesn't complain but i still get trash numbers … | |
im newbie in C++ i have a project about how to get the Total Number of HOurs Worked From inputed Tine in and Time out Time in Format: 08:00 Time Out Format:12:00 Input From Monday to Friday DTR Output must be Display the Total no. of Hours worked: 102:59 --->Example … | |
our task is to show the histogram in a vertical orientation like this: Sample Input/Output Enter a string: waka waka fifa Histogram for waka waka fifa * * * * * * * * * * * a f i k w I have here my code, but the output … | |
i was woundeirng if anyone could help me with drawing a simple image perferably a .gif thank you. | |
please help me with this problem... i dont have any idea on how to make the code... Histogram is a process of representing the frequency of data in a chart. Write a C++ program that will simulate this process. Your program should read a string (only letters are allowed) and … | |
Hey there, I need some help with the placement of constructors and how the second constructor would work (there's two of them). All I ask is for some explanation. These are the exact instructions: The default Constructor should build a dynamic array of size 3 for the grades. Another constructor … | |
This code is used to reverse a number in C++ but I have a problem. When I input 1010 or -1010, the output is -101 and 101. How should I fix this?[code]/* Christopher Langford U05799189 * clang4d@gmail.com * Assignment 3 Exercise 3 * July 23, 2010 * Macbook Pro w/Mac … | |
Hey...I'm working on a Gaussian elimination problem...my pivot doesn't seem to work correctly...the logic must be wrong. Also, does anyone know why "INFINITY" comes up as some of my random numbers chosen? Thanks in advance for any help! :) [code] Matrix::Matrix():N(0) { //Empty Matrix by default } Matrix::Matrix(int n) { … | |
I have written a program that will generate a random maze and solve it. The program uses a multidimensional array of a class that holds bool values for each wall, whether or not to show an * for the path taken, and if it is a dead end. here is … | |
I understand that you are allocating memory for Stack, buy do not understand after :: and I thought that you only used :: when declaring classes not in the classes. [CODE] myTop= new Stack::Node(original.top());[/CODE] I can post the function class of the entire program if need be. | |
take following class and two object definitions: [CODE=c++] class Rect{ public: enum centimeter; enum meter; Rect(double len,double wid,enum centimeter){ length=(len/100); width=(wid/100); } Rect(int len,int wid,enum meter){ length=len; width=wid; } //rest of implementation private: double length;//in meters double width;//in meters }; Rect obj1(10,5,Rect::centimeter()); Rect obj2(10,5,Rect::meter());[/CODE] two previous constructors have dummy enum … | |
Hi. I'm trying to make a two-dimensional array full of descriptions. As if they were map tiles for a text-based RPG. There's a point class that holds your coordinates and I use the Get_X and Get_Y functions to put into the map so it can read them. I'm just starting … | |
Dear all, I'm writing a small application in Linux using g++ compiler which asks for username and password. Could you please help me to mask the password entered by the user with * symbol? getch and _getch is not working. Please help. Thanks, Ershad | |
Hullo. I made a small webserver just to flex my winsock muscle, but it only works for small files like html files. Once I have processed the request to get the path of the file, I send the result like this: [code] ifstream fin; fin.open(URL, ios_base::binary | ios_base::in); if (!fin.good() … | |
// find new size nNewArraySize = StrNewSizeForCharReplace(pszString, pszFindString, pszReplaceString); // nNewArry size is 1063 // alllocate memory pszTemp= (unsigned char*)malloc(nNewArraySize + 1); // add 1063 character in to pszTEmp // 1063 nLength = strlen(pszTEmp) // length is 1063 free(pszTemp); // Heap memory exception How can remove this exception |
The End.