51,593 Topics
![]() | |
This another project and it is called Complex Class. Create a class called Complex for performing arithmetic with complex numbers. Y=Use double variables to represent the private data of the class. Provide a constructor that enables an object if this class to be initialized when it is declared. The constructor … | |
lemme preface by saying I have read the homework sticky, am not looking for someone to just give me an answer...more then anything I just want to understand this stuff...just am not looking to step on any toes and wanna make sure that's clear, and that I hope someone can … | |
I have a class screen and a class Brush both have header files and source files. The driver file shown first was provided to us so nothing should be wrong with it but I wanted to show you how it worked. [code] #include <iostream> #include <string> #include "Screen.h" #include "Brush.h" … | |
I have a recursive method that traverses a linked list for a first name or last name then deletes the node from the list. This is what I have: [CODE=cplusplus] void game::DeleteR(string first_name, string last_name, ListNode* &node) //throw (ContestantException) { /* See if we are at end of list. */ … | |
I'm trying to add and print two matrices and get the sum by using 2-Dimensional Arrays. I have to read in 18 numbers from a file. My txt file includes: 1 1 1 1 1 1 1 1 1 3 3 3 3 3 3 3 3 3 Currently, my … | |
How can i change the priority of function? I want to run nay other function before execution of main() function. | |
i have a prb here, i have been asked to make a procedure which recieve an array of integers,its lenght, and two integers X and Y as parameters. now the procedure needs to find X in the array and put Y ahead of it ( Y is not in the … | |
So this is the program description as per hw requirements. The following is a procedure for constructing an n x n magic square for any odd integer n. Place 1 in the middle column of the top row. Then after integer k has been placed, move up one row and … | |
hello evryone, im new in C++ programing. currently i working on my final year project. at the first place, im study in INFO COMM. ,more specific in network management area but since my project is assigned by my lecturer and the project itself involved some programming skill, i gt to … | |
As long as we are on multithreading, I have a question too .. I basically have a implementation of pthreads on Linux and I want to port it to Windows .. I have read a bunch of docs on how to do this, but I also came across the pthreads-win32 … | |
This is my first post and it is a reply to a old one but if its any help to anyone it can be done quite simply include the following if it isnt allready [code=cplusplus] #include <stdio.h> #include <stdarg.h> then create a function simular to the following void formattedtext (char … | |
I was trying to figure this out but for some reason it is illuding me Ministack header provided [code=cplusplus] #ifndef MINISTACK_H #define MINISTACK_H const int MINI_STACK_SIZE = 5; // Fixed number of element in stack class MiniStack { private: int num; // Number of values stored in MiniStack char* stackPtr; … | |
In c++ i want to know how to output the result on dos screen page wise,i.e. when i am displaying something if the page is filled then a prompt should come like "Press any key to continue.." More precisely i want an equivalent of the '/p' command which is used … | |
Been studying COM for some time now and for the life of me I can't find out how some of these standard interfaces such as IID_IConnectionPointContainer, IID_IConnectionPoint, etc., are actually defined. I can pass these IIDs in QueryInterface() calls and successfully retrieve pointers to them, so they must be actually … | |
Hi, I am new to C++.Pls help me out.would really appreciate it. The problem goes like this. There are two files. In file1(say data1.txt)u have got something like this Line1:Hello How Line2:We are fine the work is grab each string and assign it with a binary file and enter it … | |
I'm a beginner in that area, but would like to learn more. Is there any nice tutorial on the web for Windows OS regarding multithreading? | |
You will need to author two classes – Customer and Pensioner. Pensioner should be a subclass of Customer. These classes should be in their own files with separate header files. Details are below. Create a third class called Manager. The manager file can contain the main function. The Manager class … | |
I'm reading a file and I'd like to get short,int etc. apart from the usual char because I want to read 16 bit values...is there a way? | |
Please Help me to Understand the callback functions using this program.Actually i understand the program. But i want to understand it very clear , what is hear happening. So please..... [ICODE] class Button { public: class Notifiable { public: virtual void notify()=0; }; Button (Notifiable *who) : calle (who) { … ![]() | |
Am having an assignment on modular programing. the program ( VCD system) must (1) Initialize database, (2) Add a record for VCD (3) delete record for a VCD (4) Print out all VCD (5) save to text file (6) Load from text file. have actually worked on it but i … | |
Hi, Whenever a user types ./a.out with the wrong number of arguments I want my program to output something like Usage: ./a.out <-e/-d> <FIlename> <Value> how can I do this? | |
Is it posibble to have a count-down timer while I'm doing something else in the console? it's a simple game wherein a specified time is allowed for the player..if possible, how? I created a timer but it waits until it finishes before proceding to the game..tnx in advance | |
Ok, I'm working on this code where I read in two lines from a text document, then store them in an array, write a binary code for each to indicate what words are in what array, and then compare the two arrays in a variety of ways. I got most … | |
I am looking for fast conversions. I found out that converting with atof is much more faster than using the stringstream like the below tests. What I look for now is a fast way to convert from double to char* I have a problem to find this conversion. [COLOR="Green"]char* to … | |
hw assignment asks 4 the construction of a 2d array with the generation of random numbers 1-10 which has been done. next ask the user 4 which numbers occurence in the array he wants to find and its location. i have come up with this so far but the occurence … | |
[code=cpp] #include <iostream> using namespace std; struct TNode { int Data; TNode *Next; }; void PrintList (TNode *list); TNode *AddData (TNode *list, int data); void FreeList (TNode *list); /////////////////////////////////////////////////////// void PrintList (TNode *list) { TNode *p; for (p=list; p!=0; p=p->Next) { cout<<p->Data<<endl; } } ////////////////////////////////////////////////////// TNode *AddData (TNode *list, int … | |
I have an assignment where I to make a stack based calculator. I know there are other post explaining this, and I have the stack template made. My real problem for some reason or another, I am having trouble reading a string of numbers / char into a stack. At … | |
Hello, I have, before my eyes, source code, but I can't understand certain parts of it: 1. #pragma - what does it mean, is it some directive for precompilator?. for example: what does it mean - #pragma resource "*.dfm;" or or #pragma package (smart_init);?. 2. what does word __fastcall mean … | |
Having trouble getting started on an assignment for my c++ class. I understand how stacks/queues work, but what I don't quite understand is how they work as adapters, i've read plenty of sites but none really have given me a good example of how they work when implemented using a … | |
Hey, I'm having trouble with this piece of code. Basically, it's meant to look at a map file (which basically is a bunch of URLs paired to an ID) and then go through another file and replace each URL with it's corresponding ID. The code seems to work fine, but … | |
When I run my switch, choose option 3, my program crashes. Would anyone know how to solve this? I want option 3 to [ICODE]delete node[/ICODE] from my [ICODE]linked list[/ICODE]. I do not know how to do classes. Please don't suggest a fix using classes. --------------------------------------------------------------------------------------------- my text file looks similar … | |
ESR is blogging again: [url]http://esr.ibiblio.org/?p=532[/url] [edit]And don't skip the comments. | |
Header file provided by instructor [code=cplusplus] #ifndef BIGSTACK_H #define BIGSTACK_H #include "ministack.h" struct ListNode // Description of a ListNode struct { MiniStack* stackPtr; // Pointer to a MiniStack object ListNode* nextPtr; // Pointer to next ListNode }; class BigStack // Description of BigStack class { private: int num; // Total … | |
ok, I tried to do some reasearch first, but haven't really found what I was looking for. Each windows app uses a message queue that stores user input and calls the required event handler ( a simple way of putting it ... ). What I was thinking is that has … | |
I am reading Comma delimited Large .txt files(About 50 Mb). Currently I am using the method below to step through the lines in the file. I have one other application that Read the exact same .txt file that I do. That application will reach the end of the textFile in … | |
Hi, I am trying to compile several files but I get this error... [rbaena@palautordera programs]$ make -f Makefile gcc acorr.c -o ../bin/acorr ../subroutines/postape.c ../subroutines/getframe0.c \ ../subroutines/getframe1.c ../subroutines/getat0.c ../subroutines/getat1.c \ ../subroutines/decode0.c ../subroutines/decode1.c -lm; /tmp/ccDVaRlH.o: In function `getframe0': getframe1.c:(.text+0x0): multiple definition of `getframe0' /tmp/ccIvJbx6.o:getframe0.c:(.text+0x0): first defined here /tmp/ccQc0KM1.o: In function `main': acorr.c:(.text+0xc41): … | |
i am trying to mod my input but i got an error : invalid operands of types 'double' and 'int' to binary 'operator%' i would also like to noe top/60 how do i not show the remainder. i am using dev c++ this is my code : [CODE]int main() { … | |
Hi friends, again i need ur help.. I hve a text datafile which consists of one word per line like this... program byte this example and i am using the following code to read the words from the datafile.. fstream f1; f1.open("file.txt",ios::in|ios::out); f1.getline(variable,10,'\n'); f1.close(); The datafile consists of more than … | |
You are required to write a program which will: · Fetch inputs from the user · Ask the user how many words that he want to insert · Append the original inputs to the screen (and save to a file called as string.txt) · Append the scrambled inputs to the … ![]() | |
Hi, In a function of my program, I open and close the file once every recursion...and the recursion is very large....I've made sure im not writing when its closed or not opening when its open or any of those trivial issues.Will this be a problem with the operating system?...because I'm … | |
I need it in descending order and also the ability to use decimals I tried to put double in everything but it wouldn't work it says that the array doesn't match with int. Help PLEASE!!! [code] #include <iostream.h> void selectionSort(int *array,int length)//selection sort function { int i,j,min,minat; for(i=0;i<(length-1);i++) { minat=i; … | |
Hi, I'm having trouble with one last part of finishing my basic level C++ class. The program requires you to enter your 3 cards so that it can program the total of the cards. Everything seems to be in order so far, but I do not know how to set … | |
help. I do everything in C++ with STL but I have to utilitize legacy C functions within my member functions (methods). The legacy C function signature is... extern int UF_DRF_create_label( int num_lines_text, [B]char text_string[ ][132+1][/B] , double origin_3d[3], UF_DRF_leader_attach_type_t leader_attach_type, UF_DRF_object_p_t object, double model_pos_3d[ 3 ], tag_t * label_tag); My … | |
what is ISO C++ forbids comparison between pointer and integer? | |
Hi Everyone. I'm kind of new. For some weeks I've been studying cpp using devcpp and it worked just fine. I changed my PC and now I am trying to program in Builder c++. I am reading a Builer tutorial and Im doing OK with the frames and all of … | |
I really need your help..well we have a project and it is called Rational Class. Create a class called Rational for performing arithmetic with fractions. write a program to test your class. Use integer variables to represent the private data of the class -- the numerator and the denominator. Provide … | |
Hy.... I am trying to read the boot sector of my C: drive formatted with NTFS...but i am not getting the right information....can any1 help me finding the reason behind it..thanx here is the code: [CODE=cplusplus]#include "stdafx.h" #include "sunday_version.h" #include <conio.h> HANDLE h; #ifdef _DEBUG #define new DEBUG_NEW #endif #define … | |
hello,,im a Filipino student from Cabanatuan City Philippines.. Im just a Second year College student taking up Computer Science.. I would like to ask you something about sorting an alphanumeric character.. im just a student i would like to learn in advance programming.. can i have your yahoo email address … | |
hi, i am creating a program that reads input from a file into a sudoku square. and my program is supposed to check all rows, columns, grids for any repeat numbers, and if there are repeat numbers, the program is supposed to tell me which number is being repeated in … ![]() |
The End.