I looked at that page quite a few times before and after posting this. In my case, the string firstName already has data that needs to be associated with it in the text file, and I need to associate...
Type: Posts; User: RRTT
I looked at that page quite a few times before and after posting this. In my case, the string firstName already has data that needs to be associated with it in the text file, and I need to associate...
I am getting errors relating to the last function i posted.
error C2664: 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::getline(_Elem *,std::streamsize)' : cannot convert...
I'm having difficulty with this. I'm working on a project for a class that is an address book. The user will input some contact information which is stored into an object of a class, that object is...
Got everything figured out, Thanks for your help.
1>c:\users\username\documents\visual studio 2008\projects\quicksoft contact database\quicksoft contact database\person.cpp(56) : error C2059: syntax error : '{'
1>c:\users\username\documents\visual...
I can't seem to get the syntax for this function right, I am getting an error related to the function setNewContact. This file includes the function definitions for one of the classes in my program....
This was an incredible help. Thanks so much for your time and knowledge.
Person.h
#ifndef PERSON_H
#define PERSON_H
#include <string>
#include "List.h"
using namespace std;
Now that I think about it, it is likely the issue resides with code in the function definition that calls the array. Since this wasn't the line that the compiler referred to as the error, i figured...
Updated List.h to:
//Module Revied Nov 21, 2011: NDA
#ifndef LIST_H
#define LIST_H
#include <string>
#include "Person.h"
Our C++ professor assigned a group project that requires us to create an addressbook style program. The program must ask the user to input a person's contact information (ie. Name, address, email,...
I can assign a value to a single element of the array, for example, this will return "99" to the console, but if I change the final cout statement to a different element, it will not:
...
Thanks for your response. I am indeed supposed to use a "for" loop, but am having difficulty understanding what difference it makes. I updated the constructor to
List::List(){
for (int...
Beginner question here, I need to assign the same value to every element of an array, and have the computer output that value to the console. After I accomplish this, I will be adding another...
Oh, I missed your first post, can't believe I did that. This worked, Thank you both for your help with my issue. I really appreciate it.
Thanks for helping with that. I am still getting an error where the function is returning an incorrect value. I created this program to show the error I am getting.
#include <iostream>
using...
For example, If I replace the function at the end of my program with this:
double futureinvestmentvalue (double initialdeposit, double monthlyinterestrate, int years){...
Hi, thanks for your response,
I am a raw beginner, this is my 3rd assignment, and first time dealing with defining my own function. In this program, I tried to assign the variable...
My professor has given an assignment where the objective is to learn how to call a function. The assignment is a program that calculates the future value of a savings account. We are supposed to...