Edit:Worked around my first problem and now I'm getting this,but i don't undestand what variable the error message is referring at,or how I should fix it
1>greedy 3.cpp
>Compiling...
1>greedy 3.cpp
1>e:\cursuri\poo\aplicatii\greedy3\greedy3\greedy 3.cpp(39) : error C2440: '=' : cannot convert from 'int [100]' to 'int'
1> There is no context in which this conversion is possible
1>e:\cursuri\poo\aplicatii\greedy3\greedy3\greedy 3.cpp(39) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
1>Build log was saved at "file://e:\cursuri\poo\aplicatii\greedy3\greedy3\Debug\BuildLog.htm"
1>greedy3 - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
There are several things that are wrong in the code that you have pasted:
1. As mentioned, finish the class definition with a brace
2. On line 13 and 18 replace << with >>
3. What is the meaning of semicolon at the end of line 27? It means that the if does not have any effect
4. On line 27, what does o[i+] mean? Did you want to have o[i+1]? If that is the case, there it is the reason why your program crashes. At the last i (N-1) i+1 = N, but your array goes only to N-1. You should replace on line 26 N with N-1.
Mult succes. Data viitoare cand postezi, schimba numele fucntiilor, comentarilor in engleza. E mai usor pentru altii sa-ti citeasca programul
I've made the corrections you have listed above,but im getting a diferent set of errors now.Managed to narrow it down to these ones,but i cant figure out how to debug this ones:
1>greedy 3.cpp
>Compiling...
1>greedy 3.cpp
1>e:\cursuri\poo\aplicatii\greedy3\greedy3\greedy 3.cpp(39) : error C2440: '=' : cannot convert from 'int [100]' to 'int'
1> There is no context in which this conversion is possible
1>e:\cursuri\poo\aplicatii\greedy3\greedy3\greedy 3.cpp(39) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
1>Build log was saved at "file://e:\cursuri\poo\aplicatii\greedy3\greedy3\Debug\BuildLog.htm"
1>greedy3 - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
On line 39, i is an integer, o is an array. Did you mean i=0? Also, next time leave the original code intact. People will not understand your question if you change the code. Better paste it again.