I made this small C++ program, and it won't compile. Please if someone can help me to fix these 2 errors: error C2059: syntax error : ';' error C2059: syntax error : '}' The text is not in english, but it doesn't metter, just these 2 syntax errors so it can be compiled. Thank you. #include <iostream> using namespace std; int main (){ int trenutnoStanje; int trenutnostanje; float prosloSekundi; int ukupnoPjesaka; int ukupnoAuta; char ulazniznak; char znak; float n=0; { trenutnoStanje = 2; cout<<"\nPocetno trenutno stanje!"; cout<<"\nautosem: CRVENO"; cout<<"\npjessem: CRVENO"; { cout<<"\nUčitaj ulazni znak: "<< ulazniznak <<; switch (ulazniznak) { …

Member Avatar
Member Avatar
+0 forum 5

I'm really a beginner in C++ programming, and the above problem is just a part of c++ excercise. Can somebody give me a tip how to implement this in C++? The biggest problem for me is to implement and write this: • red+yellow light on cat traffic light is 2 sec duration • yellow light on car traffic light is 2 sec duration • the red on car trafffic light and red on pedestrian traffic light (the simultanuous red light) is 3 sec How to put wait. The programme just need to write on above probem on the screen. How …

Member Avatar
Member Avatar
+0 forum 7

What is needed for a C++ member function of a class to behave polymorphic? Please can anyone answer me to this, and if you can give me some example. Thanks.

Member Avatar
Member Avatar
+0 forum 5

I've got these 3 questions, I didn't work so far in C++, and this is preparation for my C++ class, These questions are a little tricky and unknown to me, I tried to find the answers in Wikipedia, but I didn't manage, if anyone can answer me, please. 1.1 Can a destructor, defined in a base class, be inherited by a derived class? 1.2 Can a base class destructor be overridden in a derived class? 1.3 Does an abstract class need a contructor? Thank you very much, I would appreciate all help, and if someone has links with examples where …

Member Avatar
Member Avatar
+0 forum 2

Can anybody give me some tip or help me with some part of this problem, thank you. Write a program which creates N new threads (N is the command line argument). Every thread in the single of M seconds (M is also command line argument) generates random prime number which writes also. ./a.out 3 6 thread tid=4, number=22973 thread tid=5, number=10477 thread tid=6, number=25763 thread tid=4, number=7297 thread tid=5, number=15461 thread tid=6, number=28163 thread tid=5, number=28771 thread tid=6, number=15803 thread tid=4, number=11149 thread tid=6, number=19379

Member Avatar
+0 forum 0

I've never programed in C++, and I have just started to learn C++, but I already get a little bit to complicated homeassignement. Is there anyone willing to help me - let's say solve me this excercise. I would appreciate any help with this and if there is anyone willing to solve the whole program, the point is in understanding it for me, so can it be explained, please. These are 2 connected problems: 4. Define a class MobilePhone for representing a mobile phone that is given by its device name, e.g., Motorola RAZR V3, the owner's name, and the …

Member Avatar
Member Avatar
+0 forum 3

Let Wallet be a class that represents the amount of coins and bills in a purse. The class has got a data element amount of type long. The binary operator += shall be overloaded as an inline method. Identify the error in the following definition. Wallet& operator+=(Wallet& w) { // add the amount contained in another purse Wallet* this; this->amount += w.amount; w.amount = 0L; return *this; } Can somebody explain me this?

Member Avatar
Member Avatar
+0 forum 2

Let class Customer { private: long id; string name; public: ... }; be part of a class definition. What is wrong with the following constructors ? Customer () { id(0); name(''X''); } Customer () ( long n, const string& s) : id(s), name(n) { } Does anyone know this?

Member Avatar
Member Avatar
+0 forum 3

Does anyone now answer to this: Suppose class X includes a data elements common declared as public. How can it be accessed by all functions in the same name space ?

Member Avatar
Member Avatar
+0 forum 2

Please can anyone tell me in few words What is wrong with the following class definition? whait's missing, etc. [code] Class Numeric { private: long x; public ... void set (long n) const { x = n; } long get () { return x; } const } [/code]

Member Avatar
Member Avatar
+0 forum 7

The End.