Blogs RSS
Forums RSS
DaniWeb Home
>
Forums
>
Search Forums
Search Results
•
•
•
•
Showing results 1 to 40 of 51
Search took
0.01
seconds.
Posts Made By:
code12
Refine this Search
Save these search results for 24 hours
Page 1 of 2
1
2
>
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
What does this error means:
1> c:\users\sherry\documents\visual studio 2008\projects\testing\testing\person.h(19): or 'std::istream &operator >>(std::istream &,Person &)' [found using...
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
This is my Person.cpp file
#include "Person.h"
ostream& operator << (ostream& aOutput, const Person& aPerson){
aOutput << "Person's First Name: " ;
aOutput << aPerson.mFName << endl;
aOutput <<...
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
#include<cstdlib>
#include<string>
#include<time.h>
#include"Person.h"
#include<iostream>
using namespace std;
typedef Person* PersonPtr;
class BankAccount{
public:
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
one more ques...u know I have one function:
Person getAccountOwner() const;
It is related to class Perosn.h file..now as i did in my one argument constructor:
BankAccount::BankAccount(const Person...
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
wow....it's working.....great thanks a lot
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
my mistake didn't remove // in front of declaration of GetAccountNumber();
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
#include<cstdlib>
#include<string>
#include<time.h>
#include"Person.h"
#include<iostream>
using namespace std;
typedef Person* PersonPtr;
class BankAccount{
public:
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
#include<cstdlib>
#include<string>
#include<time.h>
#include"Person.h"
#include<iostream>
using namespace std;
typedef Person* PersonPtr;
class BankAccount{
public:
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
If I use that code for generating a unique # whithout having any getAccountNumber function then even i get these for these two lines in main:
int main() {
BankAccount ba ;
cout...
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
This is how I'm told to use this function:
To set the account number to a unique number you should use the functions:
srand(static_cast<unsigned int>(time(NULL))) and rand() functions...
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
If I try to use this in my main:
srand(static_cast<unsigned int>(time(NULL)));
mAccountNumber = rand();
cout << mAccountNumber
And remove that getAccountNumber function from this...
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
MITRMKAR do you agree with what i wrote in my last post regarding use of const.
i guess this should work?
If no then . i think I will need to include set function even and have the chances of...
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
you know I'm not using any set function for creating a bank account, so once this value is returned in getBankAccountNumber, it won't be changed after that. this way every person would have a unique...
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
In my code the line 107 is
mAccountNumber = rand();
so it's complainig about this line
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Re: Have problem using size_t type...
#include<cstdlib>
#include<string>
#include<time.h>
#include"Person.h"
#include<iostream>
using namespace std;
typedef Person* PersonPtr;
class BankAccount{
public:
Forum:
C++
May 11th, 2008
Replies:
26
Have problem using size_t type...
Views:
747
Posted By
code12
Have problem using size_t type...
Here is my code for the program. which I'm trying to complie...I just started testing it and was going through it step by step...but the first function whichI started testing is getAccountNumbers,...
Forum:
C++
Apr 12th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
Re: please help me with this
THANKS:)
Forum:
C++
Apr 6th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
Re: please help me with this
Is there any way in which i just use arrays & strings to make this function work.
main idea is to first compare the first and last name enetered by the user with that of the firstname and last name...
Forum:
C++
Apr 6th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
Re: please help me with this
I'm trying to write with arrays and string, in the way you have written using vecotrs.
But I'm having difficulties with loops now.
void deleteFromBlackBook( ifstream& aInFile, ofstream& aOutFile)...
Forum:
C++
Apr 6th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
Re: please help me with this
Thanks a lot. May be the algorithm u have used might help .Because I don't have to use vectors or cstrings to do this program.
I'm only using arrays and string here.
Let me try if i can make this...
Forum:
C++
Apr 6th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
Re: please help me with this
yes i think u r right.
I shouldn't pass the arrays in my function.
is it that i should not pass even contacts[] in my function alongwith lName, fName?
because i tried just removing fName & lName and...
Forum:
C++
Apr 6th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
Re: please help me with this
but it still displays all the contacts even after i run this delete function?
Forum:
C++
Apr 6th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
Re: please help me with this
yes i did change = to ==.
and wanted to make 12 to 17 look like this so haven't changed it.
this is not creating any problem or is it?
void delete(string contacts[], string fName, string lName,...
Forum:
C++
Apr 6th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
Re: please help me with this
here's how it look like now. But it's not doing anything except just displaying the cout statements
void delete(string contacts[], string fName, string lName, ifstream& aInFile, ofstream& aOutFile)...
Forum:
C++
Apr 6th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
Re: please help me with this
let me try this way:)
Forum:
C++
Apr 6th, 2008
Replies:
16
please help me with this
Views:
940
Posted By
code12
please help me with this
I'm having problem with this code.
Here's what I'm trying to do.
I want the user to enter the firstname, last name of the person whom he wants to delete from the phonebook.
then I try to compare the...
Forum:
C++
Mar 31st, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
I'm trying this now :
void searchBlackBook(string contacts[], string foName, string loName, ifstream& aInFile) {
cout << "SEARCH FOR A CONTACT\n";
cout << "Type the contacts first name\n:";
cin >>...
Forum:
C++
Mar 31st, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
No there is no input file for the add function. the file ot1.txt is created in add function and all the added contacts are written on this file, later on this file is declared input file from where...
Forum:
C++
Mar 31st, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
#include<iostream>
#include<string>
#include<fstream>
using namespace std;
const char OUTPUT_FILE[] = "ot12.txt";
void introMsg();
void selectionMsg();
void addBlackBook( string contacts[], string...
Forum:
C++
Mar 31st, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
I'm worried about the counter being gettin incremented because in add contact function I have stored lastName/tfirstName/tphone/n
at locations contacts[i]
where i gets incremented each time after...
Forum:
C++
Mar 31st, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
So i should do like this if (firstname == true && lastName == true) on line 27.
and will that proble of counter be solved if i add lines 38 to 43
Forum:
C++
Mar 30th, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
void searchBlackBook(string contacts[], string foName, string loName, ifstream& aInFile) {
cout << "SEARCH FOR A CONTACT\n";
cout << "Type the contacts first name\n:";
cin >>...
Forum:
C++
Mar 30th, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
I tried but it's not giving me the names after searching... Please if u can help...shd i show the code how i have written??
Forum:
C++
Mar 30th, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
Ok, let me try this way. :)
Forum:
C++
Mar 30th, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
that was my ques before that the user is going to type the firstName and lastName, which he wants to search in phonebook. In taht case I don't know what string firstName & string lastName is going to...
Forum:
C++
Mar 30th, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
one more thing I was not able to use the string.find("substr")
what should I use to find the firstName from the string contacts[i]
and then to find lastName in the same string contacts[i]
Forum:
C++
Mar 30th, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
Thanks. I'm going to try this.
Forum:
C++
Mar 30th, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
yes I shouldn't use i parameter in function. I deleted it.
Regarding what my code for search is doing is: It should take foName, loName from the user which he wants to search from the phonebook....
Forum:
C++
Mar 30th, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
Thanks, I got it where the problem is, but i'm not able to figure out how can I solve that problem. I used this
x = contacts[i].find(foName);
to figure out where the substr foName is located in...
Forum:
C++
Mar 30th, 2008
Replies:
48
phonebook problem
Views:
1,720
Posted By
code12
Re: phonebook problem
I was compiling my code today and ir gets compiled but shows this error instead of giving the requierd results alongwith cout statements.
For the part which is creating problem the code is as follows...
Showing results 1 to 40 of 51
Page 1 of 2
1
2
>
Forum Highlights
Today's Posts
All Forums
Unanswered Threads
All Forums
Forums
|
Blogs
|
Tutorials
|
Code Snippets
|
Whitepapers
|
RSS Feeds
|
Advertising
All times are GMT -4. The time now is
8:17 am
.
Newsletter Archive
-
Sitemap
-
Privacy Statement
-
Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC