49,761 Topics

Member Avatar for
Member Avatar for ybkumar77

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 …

Member Avatar for ybkumar77
0
128
Member Avatar for JainishP

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 …

Member Avatar for JainishP
0
131
Member Avatar for Dontais

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 …

Member Avatar for BevoX
0
103
Member Avatar for knownbeforetime

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

Member Avatar for Danny_501
0
155
Member Avatar for eforry

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 …

Member Avatar for smart7
0
115
Member Avatar for lancevo3

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 …

Member Avatar for VernonDozier
0
154
Member Avatar for bobsta

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 …

Member Avatar for bobsta
0
376
Member Avatar for axfv

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

0
53
Member Avatar for Drifter666

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 …

Member Avatar for Drifter666
0
3K
Member Avatar for Cody39E

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!

Member Avatar for Cody39E
0
50
Member Avatar for suryadaniweb
Member Avatar for lason.naitsirk

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 …

Member Avatar for lason.naitsirk
0
171
Member Avatar for bit9435

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 …

Member Avatar for VernonDozier
0
653
Member Avatar for 35nando

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 …

Member Avatar for 35nando
0
213
Member Avatar for jimbob90

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 …

Member Avatar for jimbob90
0
120
Member Avatar for MoOou

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 …

Member Avatar for MoOou
0
240
Member Avatar for Takafoo

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

Member Avatar for Ancient Dragon
0
791
Member Avatar for beddy085

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 …

Member Avatar for beddy085
0
87
Member Avatar for jay-tee

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 …

Member Avatar for adam1122
0
72
Member Avatar for majesticmanish

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.

Member Avatar for majesticmanish
0
110
Member Avatar for knownbeforetime

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 …

Member Avatar for adam1122
0
107
Member Avatar for pscha3

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 …

Member Avatar for adam1122
0
365
Member Avatar for lehe

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

Member Avatar for VernonDozier
0
92
Member Avatar for free radical

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 …

Member Avatar for Danny_501
0
93
Member Avatar for edb500

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

Member Avatar for adam1122
0
99
Member Avatar for waldchr

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 …

Member Avatar for waldchr
0
77
Member Avatar for sfrider0

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 …

Member Avatar for sfrider0
0
477
Member Avatar for Argo54325

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 …

Member Avatar for adam1122
0
160
Member Avatar for suryadaniweb

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??

0
48
Member Avatar for hassanaj

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 …

Member Avatar for adam1122
0
1K

The End.