51,593 Topics

Member Avatar for
Member Avatar for sjewenp

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 …

Member Avatar for Lerner
0
278
Member Avatar for sammy_raul

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 …

Member Avatar for Hamrick
0
80
Member Avatar for roflol

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 …

Member Avatar for vijayan121
0
202
Member Avatar for ~Ken Esquire~

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 …

Member Avatar for Ancient Dragon
0
79
Member Avatar for fabiog
Member Avatar for Ancient Dragon
0
140
Member Avatar for rakesrai

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 …

Member Avatar for Ancient Dragon
0
80
Member Avatar for zsj

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 …

0
53
Member Avatar for sjewenp

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) …

Member Avatar for WaltP
0
86
Member Avatar for gretschduojet1

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 …

Member Avatar for gretschduojet1
0
1K
Member Avatar for krnekhelesh
Member Avatar for b_naren

hi can anyone suggest a creative project which can be done in a span of 3-4 months using c++??

Member Avatar for krnekhelesh
0
49
Member Avatar for Dyamid

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 …

Member Avatar for Dyamid
0
109
Member Avatar for gauravsharma132

hi, can anyone give me some tips to make pascal triangle program. thanks in advance:)

Member Avatar for jwenting
0
49
Member Avatar for mauro21pl

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 …

Member Avatar for Ancient Dragon
0
86
Member Avatar for mauro21pl

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* ); }; …

Member Avatar for mauro21pl
0
100
Member Avatar for vikter
Member Avatar for vikter
0
112
Member Avatar for bilalb1

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 …

Member Avatar for bilalb1
0
115
Member Avatar for richerTextBox

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?

Member Avatar for Ancient Dragon
0
83
Member Avatar for mauro21pl

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( …

Member Avatar for Ancient Dragon
0
149
Member Avatar for satya_mls

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

Member Avatar for Ancient Dragon
0
47
Member Avatar for ndeniche

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; …

Member Avatar for Hamrick
0
132
Member Avatar for mauro21pl

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); …

Member Avatar for Hamrick
0
97
Member Avatar for hapiscrap

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 …

Member Avatar for hapiscrap
0
138
Member Avatar for mauro21pl

[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; …

Member Avatar for Ancient Dragon
0
108
Member Avatar for AdventChildren0

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 …

Member Avatar for Bench
0
106
Member Avatar for jaepi

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 …

Member Avatar for jaepi
0
128
Member Avatar for dev.cplusplus

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 …

Member Avatar for Ancient Dragon
0
76
Member Avatar for Arctic wolf

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: …

Member Avatar for Arctic wolf
0
305
Member Avatar for pokemon123

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 …

Member Avatar for iamthwee
0
98
Member Avatar for n.aggel

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 …

Member Avatar for n.aggel
0
141
Member Avatar for Geometroid

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 …

Member Avatar for Tight_Coder_Ex
0
121
Member Avatar for thewizard397

Hi, I'm looking for a good program writing tools C++, have any suggestions?

Member Avatar for Ancient Dragon
0
117
Member Avatar for kodiak

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 …

Member Avatar for Bench
0
231
Member Avatar for satya.vijai

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 …

Member Avatar for vijayan121
0
170
Member Avatar for NycNessyness

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 …

Member Avatar for NycNessyness
0
891
Member Avatar for mypopope

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

Member Avatar for toko
0
92
Member Avatar for mypopope

what is the difference between vc++2005 and turboc++ ide or any other ide c++? thank you

Member Avatar for toko
0
78
Member Avatar for khalidxa

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 …

Member Avatar for pradeepk
0
107
Member Avatar for addicted

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 …

Member Avatar for Ancient Dragon
0
57
Member Avatar for complete

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. …

Member Avatar for vpsingh88
0
2K
Member Avatar for tunday

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 …

Member Avatar for tunday
0
236
Member Avatar for vpsingh88

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 …

0
53
Member Avatar for jaz

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 …

Member Avatar for jaz
0
125
Member Avatar for Tight_Coder_Ex

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 …

Member Avatar for Salem
0
121
Member Avatar for sammy_raul

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

Member Avatar for vijayan121
0
109
Member Avatar for Fromethius

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 …

Member Avatar for Tight_Coder_Ex
0
177
Member Avatar for C+Marshall

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 …

Member Avatar for C+Marshall
0
176
Member Avatar for ZSA004

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 …

Member Avatar for krnekhelesh
0
230
Member Avatar for spider_pig

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) …

Member Avatar for dougy83
0
164
Member Avatar for toko

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; …

Member Avatar for ndeniche
0
126

The End.