49,761 Topics
| |
Ok so this is what I am trying to do but seem to have a problem with my input loop because it keeps reading in only the first set of student data. I am also unsure where to put the cin.ignore because my getline function is not working. Please fogive … | |
Can you compare strings with if, or do you have to use something else? Can you compare strings at all? Im attempting to write a console program just for fun. Eventually I want it to be able to move around files and such but im not even close to that … | |
"Define a class Student that has as its members the student_name and a student_idnumber both of type string. Input from the keyboard the number of students in the database, then create a dynamic array of type Student and input the information for each student. Once you populate the database (stored … | |
Hello everyone, i have not posted here in a while. But i have a question about a string class I'm creating. Every time i make a string class this always happens, and i cannot figure out why. Maybe its something i didn't include or something i have to add. But … | |
so i have some code that ive been working on, and dare i say, understanding, involving linked lists, only i've hit a wall I need to add a new structure, called date, so that a day, month, and year, are associated with every node, for rolls, jam, and tea, and … | |
[CODE=Cplusplus]#include "STDAFX.H" #include <iostream> #include <iomanip> #include <string> using namespace std; class Transfer { protected: string Name; public: void transfer(); void xfer(string); }; class Exchange { protected: string exchItems[4]; public: void exchange(); string exchange(int); }; class Voucher { protected: string vnumber; string company; double amount; public: Voucher(string, string, double); void … | |
hi guys, im new at the forum and would like to ask for assistance with a programming assignment. First the Question.. [COLOR="Green"]DEVELOPMENT OF A C++ PROGRAM FOR A STUDENT RECORD SYSTEM. You are to develop a student record system that makes use of the C++ structure and classes. The record … | |
I need a nonblocking socket so in an older version of the program i made a new thread to do this. and now that ive migrated into visual c++ it crashes with no explination... yea im really aggravated... can anyone tell me why this crashes? [code] #include <iostream> #include <winsock.h> … | |
I have been working on this for a few days now. I'm just trying to make a deep copy of a template linked list. I have successfully copied the list, but when I enter a new item to the new list, it also adds it to the original list. I'm … | |
Hey so as i mentioned here [url]http://www.daniweb.com/forums/post840142.html[/url] i need to check if a process is responding by using sendmessage however i have no idea how to get the hwnd because i start the process using system::diagnostics::process [CODE] process->StartInfo->WorkingDirectory=sinfo->workingDirectory; process->StartInfo->Arguments=" -exec "+sinfo->init+" -port "+sinfo->port+" "+sinfo->options; process->StartInfo->FileName = sinfo->exe; process->StartInfo->UseShellExecute=true; [/CODE] so … | |
I am new to programming and am having trouble with a school assignment. I need to make a class planner that prints out information after the user enters it and then askes for specific class numbers. The user enters the following information (in this order): 1. Name of Class 2. … | |
I have the following code below which is part of a program to create a Huffman Coding tree. The problem is that it runs through correctly for one node, outputting that character 'l' for a certain file has a specific frequency. However...after going through several iterations, it runs into a … | |
The program I'm trying to write uses a linkedList templated class to manipulate and add polynomials in the form ax^b + cx^d + ex^f etc. The polynomials are stored as linked lists. My problem occurs when I try to add them together. I've added some cout lines to try to … | |
Hi, I'm trying to create an array or <list> of different objects ( of different type). All of the objects will have parent objects of a Manager type, but each one ( as a singleton) will be in the array/list. It's for some networking code I'm building, where each incoming … | |
Hello I am currently making a program for a database which includes an SSN. The user can input the ssn but I want it in xxx-xx-xxxx and to make sure the user ddoes this have the user input 3 numbers then 2 numbers then 4 numbers in seperate cin statements: … | |
The function should remove all the occurrences of an integer (say, removeItem) from an array. If the value does not exist or the array is empty, ,output an appropriate message. My program is able to print the array without all the occurences of removeItem , but I don't know how … | |
Hi need some help with this half attempt at a deal or no deal game I would appreciate your help very much the problem is in the comments. [CODE] #include <iostream> #include <vector> using namespace std; const int n_suitcase = 26; struct Suitcase{ int money_val; }; //hold the list of … | |
I am trying to do this [code] #!/bin/bash for i in 1 2 3 4 5; do File1="$i.txt" File2="$i.obj" ./Test $File1 $File2 #save i and the result of the program somehow done; [/code] For example, at the end I would like to have a file like this [code] 1 3.4 … | |
[code=cplusplus] class Base { //private methods void printMyType() { cout << "this is base type" << endl; } //public methods void printAllInfo() { cout << "this An accout" << endl; printMyType(); } }; //end base class class derived : public Base { //private method void printMyType() { cout << "this … | |
The [B]problem [/B]I have is how to do a switch where I have to call the certain choices. [CODE]int main(void) { do { cout << "Hello there ." << endl; cout << "Select from the menu." << endl; cout << "A gets lyrics." << endl; cout << "B gets artist." … | |
please help me i want to make a program that implement functions and arrays using pointers.The user provides an array of integer data, while the system calculates the average ,standard deviation,and median of the array. i am unable to convert the input data string into separate parts and save into … | |
Hey, I want to check if a program is frozen by using send message.. what message should i send it? and will this work? like could i send it something random like 0xFFFC? | |
Everybody hi. I need to swap elements of my std::vector container. For example, i have vector with values from 1 to 5; and i need to swap 2 with 3 (only nearby elements), that in result i'll have 1,3,2,4,5. In real world i don't have std::vector filled with numbers - … | |
Hi, I have written a c++ program which takes a word and prints a list of all possible words that can be formed from it. I want to create a .exe file which can serve this purpose for me. By that I mean, I don't want to always compile and … | |
Hello: I would like to get a good grasp on single linked list. I am looking for easy to read, detailed article on linked list and how we can add, delete, print, insert nodes and such. Hopefully someone has a good suggestion. Thanks. | |
here is my code: [code]#include <iostream.h> #include <conio.h> int main() { clrscr(); int A[10][10],m,n,x,y,sum=0; // Ndertojme nje Matrice A cout << "Ju lutemi vendosni numrin e rreshtave dhe te shtyllave per matricen A : \n"; cin>>n>>m; cout << "Vendosni elementet e matrices A duke perdorur hapesine pas cdo elementi dhe … | |
Hi, I have a namespace in my header file and a variable declared in it. When I am trying to assign it to a value in my .cpp file in the format namespaceName::variableName = value , it is throwing a linker error saying it is already defined in .obj file. … | |
I'm trying to make a program to allow me to enter information(mainly books) in to a sort of library. I read that <list> is an easy way to add things and sort them. Also by use a hierarchy I can use my base class and just add on to each … | |
I am trying to load in a list of words into my program using a dynamic array and the string class....for some reason, all the tutorials are using char which i have no idea how to adapt to my code.... [code] string *strWord; int Position = 0; string strHolding; //for … | |
Hi Everybody, I have an existing and working VC++ project, and i wand to have an activex control for the same. Is there any method that i can convert or rap up my existing code into an activex control? Thnaks Anand |
The End.