thanks everyone, I really appreciate all the help!
Type: Posts; User: criticalerror
thanks everyone, I really appreciate all the help!
thanks guys!
i am having trouble implementing quicksort... i cannot find decent implementation details... I'm still pretty green when it comes to programming, so anything in plain english would be most helpful.
what is the best / fastest way to sort strings alphabetically or numerically?
figured it out...
len = SSN.length ();
alright... i'm getting closer... I have changed to namespace std, but now the strlen is looking for a char * (c-style string?) instead of a string... what do you use for strings?
btw elad where in...
i am using the #include <string> and it says that string is an undeclared variable when i try to do something like
string SSN;
I am having problems with the validatessn function, it will always return false, or at least it seems like that is what it is doing. it also takes way too long (or at least it seems like it to me) to...
Alright, I am re posting what is supposed to be the correct code, I totally messed up before: this is what the books says:
int Date::CheckDay( int testDay ) const{
static const int...
now... how do I use a "get" to get data stored in the class to display out on the screen what was input for each person?
nevermind that I realized that I didn't have the Person(); in the Public section...
using
Person (); //(in the header)
and
I have this for the consturctor section. using your example i am still getting errors:
d:\Visual Studio Projects\person\person.cpp(30): error C2512: 'Person' : no appropriate default constructor...
how do you make a "default" constructor? I am sooo lost right now... I tried this:
int main (void)
{
Person name;
Person lname;
Person soc;
Person GetfName();
no.. i hand typed it in... my bad... changing it in the post.
#ifndef Person_H
#define Person_H
class Person{
private:
char *fName;
char *lName;
char ........N;
int Birth_Year;
int Birth_Month;
int Birth_Day;
//person_functs.cpp
#include "stdafx.h"
#include "person.h"
Person::Person (char* fName, char* lName, char* SSN, int Birth_Year,
int Birth_Month, int Birth_Day){
fName = "";
lName =...
I cannot figure out the proper way to implement classes, I have just begun learning about them and I am trying to wrtie a program to take a first name, last name, social security number, birth year,...
i have this from my book, but is there a better way to do it?
int Date::checkDay (int TestDay) const
{
static const int daysPerMonth [ 13 ] =
{ 0, 32, 28, 31, 30, 31, 30, 31, 31, 30,...
i apologized in one of the three posts... i didn't mean to post three times, but the page wouldn't send for some reason... i was just too anxious.... anyway, thanks for the answer.
sorry to make three posts, something strange happened when I sent the form...
How do i concantenate two strings in C++? Is there a built in function that does that? I want to take these two strings for example:
Johnson
Sam
and make it one string as Johnson Sam
How do i concantenate two strings in C++? Is there a built in function that does that? I want to take these two strings for example:
Johnson
Sam
and make it one string as Johnson Sam
How do i concantenate two strings in C++? Is there a built in function that does that? I want to take these two strings for example:
Johnson
Sam
and make it one string as Johnson Sam
Thanks!