hello! I have a problem with initializations of user class

0 votes
asked by about Dev-C++

fraze "userclass user(5)" must be the same "userclass user=5" in case class contains constructor userclass(int) but unfortunatly "userclass user=5" doesn t work

1 Answer

0 votes
answered by (89.7k points)

No, the initialization "userclass user = 5" is not valid in this case. The correct initialization should be "userclass user(5)" when the class includes a constructor with a single integer parameter.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...