Thank to both of you I Think I've got it. I think I'm understanding the template concept much better.
I'll try to do another "little" program using template to make sure.
Thanks so much.
Type: Posts; User: flicka
Thank to both of you I Think I've got it. I think I'm understanding the template concept much better.
I'll try to do another "little" program using template to make sure.
Thanks so much.
ChaosEngine
Thanks It should help big time.
I'll work on this and let you know how it goes.
Thanks again.
I went through my book's chapter about function templates and I'm trying to make sure I understand this correctly.
There’s an example in the book so I tried to do a program using templates to create...
Well No third file for this one.
I'm want first to get this one to print the first and last name and then I'll try to do one with or an adress book or a payroll type thing. It's more to understand...
I'm encountering for the first time linking error.
can anyone tell what they mean?
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function...
I have reworked my program completely and I am now getting linking error when I use the compiler.
Here is my header file:
#ifndef H_personType
#define H_personType
#include <string>
...
Thanks linucksrox !
Here's the .cpp file that I have done.
#include <iostream>
#include <cstring>
#include <cstdlib>
using std::string;
I made the changes and now I'm getting an error message that starts with this:
.cpp(23) : error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'const...
:D That's a good one.
Yes for the return it's a mistake from copying the .cpp
I'll try that. Thanks.
Thanks linucksrox !
It solve the first one of my prolbems. Still Have the second one comming up
.cpp(22) : error C2511: 'void personType::print(void)' : overloaded member function not found...
Ok! Corrected that but now I'm getting 2 new error messages that I don't understand. The error messages are:
.cpp(16) : error C2511: 'personType::personType(void)' : overloaded member function...
thanks loko!
I missed that one :(
Ok! If I put this part:
#ifndef personType_H
#define personType_H
class personType
{
public:
void print() const; //Function to output the first name and last name
void...
It's probably an easy program to fix but as a newbie I'm having trouble understanding the concept of class.
I'm supposed to create a person class to represent a person. (You may call the class...
Durban thanks I've made the changes but I'm still getting a bunch of errors that I don't understand. If anyone can give a hand to figure this out it would be great.
#include <iostream>...
I went through the chapter of Classes and I though i had understood this pretty well, with class, private, public, constructors, destructors ... So I tried to do a program from an exercise that...
Sorry I couldn't check in earlier!
Ok Tonto I'm reapeating after you:
Say it with me now:
structs are classes
structs are classes
structs are classes
structs are classes
structs are classes
Thanks so much Tonto!
I will remember that I need to use strcpy and strings for characters.
It's working now just fine.
Thanks durban.
I just tried what you said and it's not working either.
Now I'm getting a bunch of errors I have never seen before (ok I'm new at all this) like:
error C2228: left of '.Name'...
Thanks Daved! I will try to remeber what you said.
Actually I truied to make sense of this by doing a program and I would like you guys to let me know if this is a correct way of doinf it. I'll...
Thanks jverkoey , I did google but didn't get that one ... or maybe my eyes aren't opened enough...
Thanks Ancient Dragon I promis not to forget anymore...
Thanks again guys!
Hi all,
I went through my book's chapter about structures and it talks instantiate. I'm trying to make sure I understand what this means since it's used in a lot of places but I can find an exact...
Thanks rockytriton!
It's working.....
Well I must be really dumb because even with all your help, I'm not getting this right.
I took out the global variable, put a local one. But I'm still not understanding how to pass this variable...
rockytriton. That helps me really ! Thanks.