Hi
This is the code: Answer is below the code.
I tried to solve it my answer was wrong.
int main()
{
int i = 0, j, k = 7, m = 5, n;
Type: Posts; User: sawer
Hi
This is the code: Answer is below the code.
I tried to solve it my answer was wrong.
int main()
{
int i = 0, j, k = 7, m = 5, n;
Yes
so what is wrong with explicit CExample c(5,4)
In MSDN says:
"Objects and variables declared as extern declare an object that is defined in another translation unit or in an enclosing scope...
Thank you but i dont understand what you mean.
Could you explain this sentence.
Thank you
nothing wrong.
I only want to learn if there is a way.
I tried with extern keyword. But i think we cant use class with extern keyword.
Am i wrong?
Hi
For example i have .h and .cpp file that define my class like that:
//a.h
class CExample {
public:
int a,b,c;
CExample (int n, int m);
void multiply() ;
};
Hmm ok.
Thank you vart.
Hi
I am trying to write simple linkedlist application. But i take error while trying to delete it
#include "stdafx.h"
#include <stdlib.h>
#include <iostream>
using namespace std;
typedef...
Hmm, Thank you for this information. Understood.
Hi
Please look this code
// constructors and derived classes
#include <iostream>
using namespace std;
class mother {
public:
mother ()
Hi
Please look at this code:
#include
using namespace std;
class MyClass
{
private:
Thank you.
I wrote my codes wrong in my first post.
Sorry.
I understood.
Hi
For example i have a class, in that class there is a function that assign a string.
void func(char * name1)
{
name1 = new char[strlen(this->name)+1)]
strcpy(name1, this->name);
delete[]...
Thank you.
Here there is an information about passing array with value to func.
http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=241&rl=1
template <typename T, size_t size>
...
Hi
http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=207&rl=1 here it writes:
"Functions in C/C++ can't return or receive array arguments"
Is this true?
Can't we pass array to...
Hi
How can assembler determine that a number is signed or unsigned?
we are looking first bit of a number for positive or negative.
+0 i.e. 0000 0000
-0 i.e. 1000 0000
But how can compiler...
Thanks friends for answers.
I don't want to solve special problem , i only want to understand what compiler writes to exe when virtual function callls.I think, i confused a lot so i can not define...
I know there are so many questions about virtual funcion.And sorry for this question but i really don't understand how code finds correct VTable(not function)
I read here :...
Hi
I see that all stl components have destructors.
string s;
s.~string();
But i know that we don't need to delete stl componenets.I read all stl components automatically delete themself.Is this...
ok
thanks friends
Hi
I am new to stl.
I see that we don't need to delete our containers
For example:
vector <char> vec;
But why?
Here, Does vec allocate in heap or stack by default.I heard that Although we don't...
Thanks for all answers
Mad_guy thank you.
Your answer give me a new perspective.I think you are right.Now i am looking for this book.
I see that linux is not well documented.And also while...
ok
thanks xhi and joeprogrammer
I am downloading Linux Device Drivers book thank you.It seems perfect book.
Also your answers are useful friends now i am looking kernel.org.
Good works
Hi friends
I want to learn how linux works, how its kernel works.I have been reading books about windows because i want to learn how an OP works.It will be very useful and more easy to learn it by...
Hi
I am reading template chapter in c++.
We can specizlize a primary template both Partial and Explicit.
But what are the differences?Advantages and disadvantages.?
Thanks
thanks friends.
thanks Mario F., now i undersand it, this is perfect answer.
Good works.