Classification of surfaces The Classification Theorem for surfaces says that a compact connected surface $M$ is homeomorphic to $$S^2\# (\#_{g}T^2)\# (\#_{b} D^2)\# (\#_{c} \mathbb{R}P^2),$$ so $g$ is the genus of the surface, $b$ the number of boundary components and $c$ the number of projective planes.
From there, it is easy to compute $\chi(M)=2-2g-b-c$.
Nevertheless, I have read another statement of The Classification Theorem that states that a compact connected surface is determined by its orientability (yes/no), the number of boundary components and its Euler characteristic.
I do not understand how is it possible to know the decomposition of $M$ as a connected sum by knowing that. By knowing $b$, there are still two variables, $c$ and $g$ which have to be known from $\chi(M)$, and orientability only tells us if $c=0$ or $c\geq 1$. Can someone help me, please?

If I read correctly you are trying to determine $c$ and $g$, given a compact connected surface $M$ for which you know $b$ the number of boundary components, $\chi(M)$ the Euler characteristic the and whether or not $M$ is orientable. 
This can't be done in a unique manner, as the connected sum of a tori and a projective plan is homeomorphic to the connected sum of three projective planes.
Please correct me if I misunderstood your question.
