Hi all
I'm changing a C++ style code into C#, and naturally facing some problems. in the original C++ code I had 3 classes and a function in all of them, as shown below:
public class A{
public...
Type: Posts; User: Farnaz
Hi all
I'm changing a C++ style code into C#, and naturally facing some problems. in the original C++ code I had 3 classes and a function in all of them, as shown below:
public class A{
public...
thanks!
Hi!
I've recently shifted from C++ to C#. I'm now developing my first code in C# and wondering what the difference between a class, interface and a code file is, in C#.
which one is the equivalence...
Somewhere in my program, I have written the following line but it gives the error: vector subscript out of range and I can't figure out why.
if(!(list_of_queues[matches[k]->FirstQ]->empty())...
oh, thanks!
by the way, I have a class named Player and a subclass named Winner which inherits from Player.
I have this vector : vector<Winner*>* winners passed to my function.
in the body of...
hi all
In my program, I have a function which is supposed to manipulate the vectors passed to it. I assume that if a vector is passed to a function, a copy of it is built and any change done in the...
Hi all!
can somebody please tell me what is wrong with the following code?
the header file:
#include <set>
template <typename T>
class professional_set
{
public:
the errors are what I've written already, before or after compilation, which are the following:
expression must have integral or enum type.
no instance of overloaded function...matches the argument...
Hi all!
Can somebody please tell me what the problem is with writing such a code?
c is a double and v is a vector.
v.push_back(c%10);
c=-c%10;
thank you, it helped. :)
hi!
I'm separating header and cpp files of my program and I'm facing some problems.
first: what does defining inline classes in header files mean? does it mean that we include the definition of...
ok...guess you're right. thank you anyway.
would you plz explain it a little bit more? I'm having difficulties figuring out what I should do exactly.
Hi!
I've written a program in which I have a base class(named "Account") and some sub-classes. the subclasses have some extra attributes which the base class do not. there's a vector in my program,...
ok thank you so much :)
hi!
There is a base class in my program from which I have built a subclass.
As you can see, I have defined 2 constructors for my base class "Account".
class Account
{
public:
int...
I have to submit my assignment in an hour.I've written 3 classes with the names of Point, Line and Polygon. in each class I have used a function with the return time of the 2 other classes' pointers....
the father, whose name is passed to the function, may have some other sons and this son is not necessarily the father's first son. so it has to be pushed back in a vector (kid). I should tell the son...
Hi all!
I'm writing a "family tree"program. there's a function in my class Node which is named SON. it gets 2 strings as arguments (they represent the name of the son and the father to be related...
Hi all!
I'm writing a "family tree"program. there's a function in my class Node which is named SON. it gets 2 strings as arguments (they represent the name of the son and the father to be related...
Thank you all! it helped me a lot. but could you please explain a little bit more why my code works for static members and not non-static ones?
Hi all!
I'm writing a program in which I define a class named Point. the objects of the class are points of 2 numerical coordinates(x and y). I wanna write a constructor for my class with the...
It's "She" actually!
I know about vectors and I do use them in my programs but I just thought it would be more convenient to use arrays in this case.
I thank you all, esp whiteflags!
thank to you, I think I'm gettin a deeper undrestanding of arrays, static arrays and stuff.