Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
Quote:cout<<*name;You should write insteadcout << name;By the way you shouldn't store a pointer to the original character array (it could be a temporary). You should instead copy the array content. Even better you could use a std::string:#include "stdafx.h"#include...
13 Nov 2012missak boyajian 3 alternatives
Hey.When I do this:char *suit = "Hearts"; coutusing namespace std;class yup{public: yup(char *); void print();private: char *name;};yup::yup(char...
When I do this:char *suit = "Hearts"; cout<<*suit;it prints Hearts;It shouldn't, it should print the character 'H' only. What you do is, you dereference the pointer-to-char, so it is only a char. That's why it's only the char that is printed from your class. If you wish the class to...
Years ago I programmed COM-DLLs in C/C++ for some VB6 guys. It was a remote service and alarming software for refrigeration systems.
Also developed software in WinCE (C/C++) for a remote gateway to connect to the refrigeration controllers via CAN-Bus.
Since 2009 more and more C# and .Net development.
Actually developer for intra logistic software.
Currently dominated by huge spaghetti code monster :-/