49,761 Topics
| |
Hi, I am not sure how to categorize my problem I have a class with char* as member variables. and I am using a get method to print the variable. Now I create a vector and in to it, I am pushing the objects of the class. but while trying … | |
Here is the code I have to compare two arrays, one that is already set and one that a user inputs data into, the problem I get is that when I try to run it I get the following error: Error 2 error C2664: 'arrayComp' : cannot convert parameter 2 … | |
The program compiles but it only shows the addresses of myDate.year not the year that I input. [CODE]#include <iostream> using namespace std; class Date { friend ostream &operator<<( ostream &, const Date & ); friend istream &operator>>( istream &, const Date & ); private: int day, month, year; }; istream … | |
I'm supposed to create an array of 20 employee objects. My instructor told us to create separate source files for the search and sort functions for this array. Um, how is that done? I created two source files and just put [code]#include "Employee.h"[/code] at the top of both of them. … | |
Write a program that accepts length measurements from the user, and also whether the length is in inches, feet or meters (use the following screen shots as a guide). Keep track of the total length in meters and report the total after each user entry as shown below. When the … | |
I have to modify a Program that I previously wrote. I have to modify my sort function so that when a character is passed through it which is coded in main not given by a user it arranges it by that. Where I am at right now neither gets organized … | |
Hi, I am still rather green when it comes to C++ so be gentle with me. I am trying to create a dynamic array of objects (class Structure), each object represents a geometric (physical) structure. But for the sake of simplicity let's consider only one such object. Within each instance … | |
I'm going crazy trying to figure this out. I want to have a program that detects when a user locks or unlocks the computer, and I know ISensLogon has the functionality I need (MSDN link: [url]http://msdn.microsoft.com/en-us/library/aa376860(VS.85).aspx[/url]) but I cannot seem to find ANY examples of how to work with it. … | |
Hey All, I'm having this weird issue and I'm not sure what to do. In the main function when I put one letter it'll work, once I put a string of letters it doesn't work. I've tried an assortment of stuff and I dunno what to do anymore. This is … | |
Hello friends, i want to know how to modify the typed url in the browser applications such as Mozilla or IE.I m currently going through Mozilla Source Code.If possible please help me guys. Thank You! | |
How i pass i url to browser through c++ programme?? | |
Hi, I am very new in programming (six months), so many apologies for silly questions. I intended to write a console prog that uses libsndfile. It is kind of synthetiser. It reads text file created by user, where on each line, the information about parametres of sound synthesis are stored … | |
I'm making a program that uses three classes to calculate the price of carpet in a rectangular room: The price is calculated by multiplying the area of the floor by the price per square foot. In my RoomDimension class i need two FeetInches objects for length and width. I should … | |
Hi! I added to my project in Visual Studio 2008 library to work with Neural Networks (FANN) [url]http://www.geocities.com/freegoldbar/fann_cpp.zip[/url]. When i try to compile, following error occurs: c:\neu\neur\neur\src\include\fann_cpp.h(921) : error C2440: 'reinterpret_cast' : cannot convert from 'va_list' to 'const unsigned int *' Conversion requires a constructor or user-defined-conversion operator, which can't … | |
I haven't programmed in some time and need some help here plz. First of all how are individual characters of a string are accessed? second do they start at 0 or 1? I'm probably confusing this with arrays please help me out :). This program will read in a line … | |
hi!! I need a help with part of my assignment. My professor asks to write a program that uses switch, and while loop statements.. this is the Exercise [COLOR="Green"] Write a program that uses switch, and while loop statements to present the following menu and perform the operations. Our program … | |
Hey can anyone help me with the below errors please? vector.cpp: In function 'void printEmployees(const std::vector<employee, std::allocator<employee> >&)': vector.cpp:104: error: passing 'const employee' as 'this' argument of 'void employee::printEmployee()' discards qualifiers [code=cpp] #include <iostream> #include <iomanip> #include <string> #include <vector> #include <fstream> #include <stdlib.h> using namespace std; class employee { … | |
I need some tips and pointers.....(a solution would be great!!ha) A working games system is provided for you in Project.zip. This contains a Visual Studio “solution” including all required source for cRandomPlayer, cHumanPlayer, cPlayer, cGame and cXandO. It also includes the mainline (in BoardGames.cpp) and (to assist you) has two … | |
hi guys,i'm a young guy in South Africa,it my first time in this forum,okay here is my problem. i have this assignment where i don't even know where to start.the thing is i've never used c++ forms to do my work,so the assignment is about designing a system for doctors … | |
I have a doubt regarding forwarding declaration. in .h file:[code] class B; class A{ void func(B* tap); } [/code] in .cpp file[code] void A::func(B* tap){ tmpo=tap->par1; } [/code] does the above code snipet correct if not whats the problem. Please be descriptive. | |
What is wrong with my switch statement? It seems like that's how I've done it other times. But I get a warning that says, "switch contains no 'case' or 'default' labels and I get an error that says, "illegal case". What the hell? Note: I had more code in case … | |
Hello, I just started C++ and I have this assignment to write. I started writing it but I can't seem to get this one thing and that is [U]how to create a new contact and store it in a file. [/U] I need to know if I used the structure … | |
Hi, I was wondering: if the memory allocation in the following codes is static or dynamic, why the upper limits on their sizes are different, why some of them would cause segment fault? what you would suggest to allocate array according to different need? 1. [code] double data[1048000]; for(int i=0; … | |
Hello all, I am trying to make a lottery number generator. So I need 6 random numbers. The current code below displays the same number 6 times. Thoughts? [code] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; char userchoice; int main() { cout<<"Welcome to The Lottery Wizard!"<<endl<<endl; cout<<"This program … | |
I have the following class called Advanced Account, which inheritis from MobileAccount. The constructor for advanced account is defined below. AdvancedAccount::AdvancedAccount(MobileNumber & rnum, string & rname) :MobileAccount(rnum,rname) { mFreeCalls=0; mMaxFreeCalls=3; mMinTopup=1.0; } I then also have the following overloaded operator described below which makes LHS=RSH. AdvancedAccount& AdvancedAccount:perator= (const AdvancedAccount& raa) … | |
I am working on a fairly large project for my chemistry teacher (NOT homework!). I thought that it would be nice if the program could search a file for a user entered string and display all lines that had that string. I have gotten it as far as I can … | |
I have an assignment to use templates for a linked sorted list. The SortedType.h file is in our book and that is what we have to change. I understand how to do all of that and it compiles and everything. When I create a driver to test it, I just … | |
Hello, I'm getting the following error with this code, also i would like to know how to add the path and filespec together with a and be able to split the 2 so it would be 3 args not 4. [B][I][U]ERROR:[/U] error C2664: 'std::vector<_Ty>::vector(const std::allocator<_Ty> &)' : cannot convert parameter … | |
Hi, I want to write c++ programme that it search oracle Jinitiator in my computer if find no then it autimatically install the Jinitiator in my computer. How i do this please help me?? | |
Hola. I went through the forums and found that NOORA000 asked this question before, but the thread is dead by now and no answer was given. I have a program that i need to send an SMS from as soon as it produces a certain output. Does anyone know of … |
The End.