49,761 Topics

Member Avatar for
Member Avatar for SasseMan

Hi! I am having some problems with using the operator= on an dereferences object. I have the code... [CODE]Julian j1(2319,1,7); Date * dp = new Gregorian(2319,1,23); cout << (*dp) << " " << typeid(*dp).name() << endl; *dp = j1; cout << (*dp) << " " << typeid(*dp).name() << endl; j1 …

Member Avatar for SasseMan
0
97
Member Avatar for anakondaksa

I want to develop this program through the arrays to work on more than how Server؟ [CODE] /////////////////////////////////////////////////// /// Program For Simulation 2 server in 2 line //// /// Create By :Anakonda-ksa //// //////////////////////////////////////////////// #include<iostream.h> #include<stdlib.h> #include<cstring.h> int main() { int na=0 ,nb=0; float time=0,total_time,no_of_completion_a=0,no_of_completionb=0, total_area_a=0,event_time_a,total_busy_time_a=0,total_area_b=0,event_time_b,total_busy_time_b=0, Ra,Rb,Xa,Xb,Ua,Ub,Na,Nb,prev_event_time_a,prev_event_time_b; string event_type; { …

Member Avatar for jonsca
0
86
Member Avatar for safenaa

i want to know how make dequeue in queue . please, the answer with a complete program. thanks,,,,,,,,,,,,,,,,,,,

Member Avatar for jonsca
0
39
Member Avatar for BazookaJo

Hi guys, first of all let me say that I'm a Delphi guys, but I've been cleaning up some old legacy C++ code without any real issues. The following piece of code however baffles me! It looks like it simply copies the binary input file to another file bit by …

Member Avatar for BazookaJo
0
157
Member Avatar for Silvershaft

I've written a DLL with keyboard hook inside, how do I load the dll in my code and like activate it, the hook function inside dll writes keyboard presses to a file, I would like to activate it from my exe.

Member Avatar for Silvershaft
0
143
Member Avatar for new programer

Hi, How can I create a program that detectes plagarism lets say we have two files and we want to compare them and at last to have the percentage of smilarity I am aware of strcmp and compare and I know how to use them it's just the methodology that …

Member Avatar for Salem
0
112
Member Avatar for fadia

Heey guys... I'm in a rush.. I don't know how to write on definition of a function here. Please help. The function interval_since is supposed to compute the time. The previous time and the current. I'm confused how to write the definition. Here is my code.. and the very last …

Member Avatar for Salem
-3
110
Member Avatar for _Michael_

Hello, I am making a console application for a window home computer. The application will search for factors of a number that the user enters. Everything works fine up to about [10^10 = 10000000000]. I am unsure if C++ has a maxium number allowence. If this is the case can …

Member Avatar for WaltP
0
126
Member Avatar for biesczadka

[code] void read (std::istream & _input) { string linijka; vector<string> entry; string laaa, naa; int ii=0; while (getline(_input,linijka,'\n')) { cout<<"current line:"<<linijka<<endl; while(linijka[ii] != ',') {laaa+=linijka[ii]; ii++;} entry.push_back(laaa); ii++; cout<<entry[0]<<endl; laaa.clear(); while(linijka[ii] != '\n') {laaa+=linijka[ii]; ii++;} entry.push_back(laaa); //doing something with entry ii=0; laaa.clear(); linijka.clear(); entry.clear(); } } [/code] my csv file …

Member Avatar for mrnutty
0
83
Member Avatar for john butler
Member Avatar for Narue
0
155
Member Avatar for harryhaaren

Hey all, I've tried many times to write a C++ class around a C library to make a nice clean interface to that library. Now I keep on getting the same problem: Once in the class, I initialize the C library, and then the C library complains that EG: error …

Member Avatar for harryhaaren
0
441
Member Avatar for لولوة

Can anyone explan the main idea of using set and get function , because im confusing between them .:-/

Member Avatar for Dave Sinkula
0
210
Member Avatar for BobFX

Hi, I am trying to make and use my own DLL within a C++/CLI project. The DLL project contains an header utc.h file with the following declaration: [code] namespace utc { __declspec(dllexport) void dthr (int dt[3], int hr[3]); }[/code] The source of the dthr.cpp file starts with: [code] namespace utc …

Member Avatar for Excizted
0
182
Member Avatar for Excizted

Hi all :) Currently I have a console for my program, which in short words, executes the function named what you write. The thing is, the functions needs, for several reasons, to be members of a class. Currently I have the code below. Manager is a class that needs to …

Member Avatar for Agni
0
143
Member Avatar for kevintse

Hi, everyone. I am stuck in such a situation: When failing to open a file, of which the name is in Unicode, I need to show the user something like "Can't open file: \My Document\file-name-in-unicode.txt" by throwing an exception . I often use exceptions this way(is this a good way?). …

Member Avatar for kevintse
0
3K
Member Avatar for new programer

Hello all I was looking into some textbook solution (preparing for my exam) and I saw this program: Question Details: write a program that reads in a set of positive integers, representing test scores for a class, and outputs how many times a particular number appears in the list. you …

Member Avatar for vmanes
0
126
Member Avatar for manosha

hi 2 all, I have an assignment about classes, everything IS OK , except of the draw function of a square.(after running the prog. there is no square drawn ) this wt I did till now:[CODE] class Square{ private: int sidelength; char ch; public: Square();//default constructor void setSidelength(int);//sets default values …

Member Avatar for jBat
-4
132
Member Avatar for _Michael_

I am making a command line program that finds factors of a number that the user enters. At the moment the user could enter something like this: '768r7fg38gf8320rf' which returns an error. I would like to restrict the user so they can only enter numbers (0 - 9). How would …

Member Avatar for WaltP
0
119
Member Avatar for hmadison1984

Hi, this is my first time here and I have a problem. I am trying to write a C++ program in Unix that gives me the Gregorian calendar with exceptions to leap year. I have all of my algorithms for calculating days, printing out the months, and such. My problem …

Member Avatar for WaltP
0
220
Member Avatar for bhas_purk

hi guys, I am getting this weird problem when I sort items in a listview control. Initially when my list has few items, it sorts fine. When the size of the list increases beyond a certain number of items, around 1000, then the LPARAM pointers passed to the sort function …

0
83
Member Avatar for lucky_43

hello guys I want to make a c++ program which is designed to receive some elements of a linked list by the user in a (while switch formula) and then the user can delete a specific value that he can designate . my problem is in delval function which delete …

Member Avatar for lucky_43
0
92
Member Avatar for MKO

:-/I'm getting the following error when I debug this small test programm . I can't find anything wrong with it. Even on MSDN they come up with a two line sample code which generates that fault code. In other words, they have no clue either. I hope that some one …

Member Avatar for Salem
0
124
Member Avatar for begueradj

Hello, I would love to create in C/C++ an array in which each cell is a pointer on a linked list of integers: can someone tell me how can I implement this ? Thank you very much for your help Begueradj

Member Avatar for begueradj
0
99
Member Avatar for kawal.singh

Hello Helper, This is my code. I want to compress the file encrypted and then decrypt the same original file.Can you help ? /* [CODE]#include<iostream.h> #include<conio.h> #include<fstream.h> #include<stdio.h> #define ENCRYPTION_FORMULA (int)Byte+25 #define DECRYPTION_FORMULA (int)Byte-25 int Encrypt(char *FILENAME,char *NEW_FILENAME) { ifstream fin; ofstream fout; char Byte; char NewByte; fin.open(FILENAME,ios::in,ios::binary); fout.open(NEW_FILENAME,ios::out,ios::binary); if(!fin) …

Member Avatar for Rajesh R Subram
0
179
Member Avatar for rahul8590

Well for past few months now i have been doing my research on encryption cipher and i have tested on plane text , its not a problem . If i have to test the fastness of the cipher i got to try it on movie and audio files and check …

Member Avatar for rahul8590
0
728
Member Avatar for new programer

Hello all, what is the difference between [CODE]*grade++ *(grade++) (*grade)++ ++*grade *++grade *(++grade)[/CODE] please with examples... I didn't understand manipulationg pointers very well help asap

Member Avatar for Ancient Dragon
0
75
Member Avatar for Burnout

Hi, I've been revising object orientated programming, and decided to have a look at accessing parts of my code in other files. The problem is, I get error messages such as "Player1" not declared, and I can't figure out how to declare them. For example, in my main.cpp file I …

Member Avatar for pspwxp fan
0
125
Member Avatar for Geek-Master

I have been reading about pointers, which IS confusing. I'm sure there is a purpose, but I don't know why I need them yet. For example [CODE] [COLOR=Red]var1 = 23;[/COLOR] [COLOR=Blue]// assigning 23 to var1[/COLOR] [COLOR=Red]var2 = var1; [/COLOR] [COLOR=Blue]// assigning the value of var1 to var2[/COLOR] [COLOR=Red]var3 = &var1;[/COLOR] …

Member Avatar for new programer
0
487
Member Avatar for pink16

im just a 1st yr college student.can u help me this problems? Compute the power of a number given the base and exponent. Do three versions of this program using a while loop, a do-while loop and a for-loop

Member Avatar for jonsca
-1
91
Member Avatar for dchunt

Say i have this 10,000,000 (10 million) byte file. I want to perform multiplication,addition and few other operation on all those bytes(total of 5). And after it is done say if i want to repeat the addition and other operations on the same file like a loop,then How many such …

Member Avatar for jonsca
0
830

The End.