51,593 Topics
![]() | |
i am totally new to the c++ arena. i have been tasked with writing a program that asks for a number, asks for that many names, in the form, "last, first," sorts the names by last name, but displays them in the form, "first, last," then offers the user the … | |
I was just trying to implement one of the design pattern Strategy of the gang of four . In my application one of my strategies has to operate on the data (and the data is huge , not 1 not 2 but huge) , now as the GoF says that … | |
So I'm trying to count the number of lines in a text file. I think I got it working, but it seems I can't do further correct processing on the text file, maybe because getline extracts the data? The operations I want to perform include inputting values read from the … | |
Can someone plus lead me in the right direction with this problem? 1.) Write a function to add an item to the list, given a name and a phone number as arguments. Don't forget to allocate memory for each of the data items in the node; return a success or … | |
| |
I m using Qt, I have multiple forms. The data from any form has to be sent using socket. also data coming over the socket has to be displayed in a main form. what could be my design so that i can share the socket connection among different forms also … | |
Hi , im working with ISA I/O card. previously i have only done communication through serial port and that was pretty simple using c++ as well as visual basic. now i hav no idea about how to communicate with this hardware throug ISA slot .for now i simply want to … | |
i posted a similar thread a few days ago re: this program, but i can't get it to work with functions so i'm giving up on them. i need to write a program that asks a user for a specific number of names, then asks for the names, (last first) … | |
Hey everyone, I'm new to C++ programming and have just started the semester and having a bit of trouble with my second homework assignment. Here's the assignment: Write a program that accepts a 7-9 digit integer andechoes the number with commas between every three digits from the right. Here's what … | |
How do you introduce mouse in c++ program? | |
hi can anyone suggest a creative project which can be done in a span of 3-4 months using c++?? | |
I would enjoy some help in directing my search for C++ code in a more specific area. I only have two years of college level C++ programing expirence under my belt so i would love to keep most of the coding simple. I want to create a function that moves … | |
hi, can anyone give me some tips to make pascal triangle program. thanks in advance:) | |
Hi I have a piece of code. It's print for me the numbers I enterd but in reverse order that I would like to. How may I change that? thx [CODE] #include<iostream> #include<conio.h> using namespace std; struct Node { int data; Node* link; }; class Q { public: Q(); void … | |
Hi I try to fill linked list with names. I have one error could anyone fix it. [CODE] #include<iostream> #include<conio.h> #define MaxSize 30 using namespace std; struct Node { char name[MaxSize]; Node* link; }; class Q { public: void get_input(char array[]); void print_input(); private: Node* head; void display(Node* ); }; … | |
hi, can you help with the code to delete a structure object in c++. Thanks | |
hi I have the following problem... I have a program (c++ code) which updates some logs ...(i am using linux as the operating system) I was wondering that is there a way by which i can execute this code/program after every two (or what ever time period expires )by creatiing … | |
Does anybody know if there's a way to interact with a printer that prints onto CD's? I've googled it and haven't found anything promising. The app that I'm writing is going to need it. It seem that only the manufacture of the printer can interface with it. Any ideas? | |
Hi Why is that wrong [CODE=cplusplus] #include<iostream> #include<conio.h> using namespace std; struct Node { char your_name; Node *link; }; typedef Node* NodePtr; class Q { public: Q(); void get_input( ); void display_input( ); private: NodePtr head; }; int main() { Q name; char your_name; cout<<"What is your name: "; name.get_input( … | |
hai this is the most important and use full material on C++ and data structures. it is usefull for bot Engineering and Graduate students. Links: <url snipped> Download it as a free Enjoy | |
i actually feel like a n00b asking this, but i'm a little of what you might call rusted in this stuff, since i hadn't need to handle files for a year now... i searched for some guide, but i only found out how to [B]open[/B] a file... like this:[code=c]ofstream *pfile; … | |
HI I am trying to combine(I think that is the word) a node and a class together.Could anybvody try to find the error I have thx [CODE] #include<iostream> #include<conio.h> using namespace std; struct Node { int data; Node* link; }; typedef Node* NodePtr; class Q { public: void insert_data(int data); … | |
i get 3 build errors when i use the numbers, the simple payroll program aint so simple for me im using java tools in x-code [code=cplusplus] #include <iostream> using namespace std; main() { int employeeid; int hoursworked; float hourlyrate, grosspay, taxamount, netpay; float const TAXRATE = 0.10; cout << "ENTER … | |
[CODE] struct NodeType { char name[MaxNameSize]; NodeType* next; // A pointer to the next person in line }; void GetInLine(char new_person[]); int main(void) { char X[MaxNameSize]; Q q1; q1.GetInLine("Joe"); void Q::GetInLine(char new_person[]) // This function causes a person // to get in line in the appropria spot. { NodeType* temp; … | |
Ok so far I got this, it takes a string of characters and prints out their binary representations. I am semi new to C++ and I cant for the life of me figure out how to get the hexidecimal and octal representations of the input. Here is the code so … | |
Hello there, I have here a program that reads a txt file taking each word in three columns separated by a comma and storing it to a vector. It has a filter that whenever it sees a comma, it seperates the word from each other. My problem is, whenever I … | |
Hi to all, I hope uyou can help with the following situation i have: I have to write a function that receives a parameter, that is unknow until runtime, meaning one of the parameters could be: CString, int, double, bool or something else The function receive additional parameters that are … | |
Hello everybody, I wrote a program that can save some data into file and then read it from there,the weird thing is that it loads correctly from the file only when it's in debbug mode,and doesn't do it at all when it in release mode. Here are the code fragment: … | |
Write a C++ program for the classic hangman game - guess the word without getting more than 6 letters wrong. The user is informed of the number of letters in the word to be guessed. A wrong guess of the letter would cause additional part of the hangman figure to … ![]() | |
Hi, i 've recently done a university project requiring me to construct a data structure{ a heap}.... Now that i 've finished the programming task , i am thinking how can i measure the programm's performance..... I will populate my data structure with 2 million random elements, and i will … | |
Hello, I'm new to the site here. I say this because there seems to be a fair bit of etiquette here that I could step on so if I do, that's why. Anyhow, I had to take C for my software certificate and since I wanted to take C++ and … | |
Hi, I'm looking for a good program writing tools C++, have any suggestions? | |
Hi, these classes for making a MuD are driving me crazy!!! heres my starting code, haven't had more than 15 minutes to work out some basic stuff, just trying to start small, get it to compile, then add stuff... [code=c++] #include<iostream> #include<cstdio> #include<windows.h> #include<fstream> #include<cstdlib> #include<ctime> using namespace std; int … | |
Hi, I have a text file which looks in the following format =====c:\text.txt ====== AAAA BBBB ... ... ================== I have to read each line of the text file into a buffer, and print it, which I did in the following way. [code] #include "stdafx.h" #include "stdio.h" #include "string.h" #define … | |
I'm currently having a problem with having where it says DailyChild on my code to go up when the user adds a number. For example if they type 1 it should say 1.50. If they enter 2, it should say 3.00. But no matter what I do, it keeps printing … | |
ellow smart people. I want to learn c++ programming. can anyone recommend what to do or what book do I need to read? pls help me with this? what is the latest version of C++? thank you | |
what is the difference between vc++2005 and turboc++ ide or any other ide c++? thank you | |
Hi guys, I am working on a two dimensional array to represent a matrix. [CODE]int matrix[i][j];[/CODE] I need to swap all the values of matrix[1][1] to matrix[1][2] . I am not sure how to do the swap, I did try to use for loop and matrix[1][j+1] , but it did … | |
hey, i need help with this, i use VC++ 6.0 and i am having problems with opening files in multiple file modes for example [code] fstream inOutFile( "addicted.dat", ios::in | ios::out ) ; [/code] my compiler behaves abnormally, i dont know what is wrong, if i try single mod, it … | |
How do I capture the Enter Key event in an edit control? I have so far inherited my own class from CEdit and I am capturing the input keys but it the method used to do this does not receive the event when the enter or return key is hit. … | |
I have a program written in BCB that imports a wsdl. When I run the program I get this error: [C++ Error] ExtActns.hpp(614): E2015 Ambiguity between '_di_IBinding' and 'Wsdlbind::_di_IBinding'. I looked through the ExtActns.hpp file and found this line of code: [code]HRESULT __stdcall OnStartBinding(unsigned dwReserved, _di_IBinding pib);[/code] I need help … | |
Hi, I have a unique problem to solve in VC++. do have a look. I have created a CEdit class under ChildWindow. Now I would like to get WM_CHAR messages for every character typed in the edit box. The problem is if i put WM_CHAR in the message map of … | |
construct a hierarchy chart (divide the tasks into modules) then an algorithm,flowchart, or pseudo code that will allows a person to track a list of personal contacts. for each contact there are five fields - First name - Last name - Occupation - Phone Number - Relationship (of the contact … | |
In assembly I would[code=asm] ProcA enter 16, 0 call ProcB leave ret ProcB enter 16, 1 ... code leave ret[/code]Even if ProcA is in another file, so long as I know the order of the variables in ProcA they are visible to me in ProcB because [U][B]16 ,1[/B][/U] nests procedures … | |
I have read somewhere that if you dynamic_cast a void* you get the start of the address of the object ? I have no clue about this. How is this possible.? Can someone help me on this | |
Hi everyone. For the past day I've been trying to find a good way to handle keyboard input. Naturally, I wanted to just use WM_KEYDOWN and WM_KEYUP to handle my events, but they proven to have limitations. In my game there was a keyboard delay. If you pressed and held … | |
Hello everyone. I'm new to DaniWeb and new to programming with t C++ i have been working on a problem for several days now and I think i may have the code correct except i'm getting compiling errors related to my if..else statements in the GetGrossPay function. I've tried moving … | |
I am trying to finish a fishing program. Basically the user inputs how many fish spawn and how fast they move, then the user tries clicking as many fish as possible before they go off the screen. Also, the fish need to turn into a fish skeleton (which was drawn … | |
Sorry if this has been asked before but I have tried to find a solution elsewhere. I am using the getline function to receive input from the keyboard and save it in a text file. The problem is that it insists on printing a null character (the square box thingy) … | |
i was wondering how to make a person to chose beween two things with the if statment? for example convtering to celsius or converting to fahrenheit. would this work? [CODE] void FahrenheittoCelcius void CelciustoFahrenheit int main() { int personchoice; if (personchoice == 1) { void FahrenheittoCelcius; } else void CelciustoFahrenheit; … |
The End.