49,761 Topics
| |
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 … |
The End.