i have a problem
i can write a c++ program with no syntax errors but it always have many logical errors

how can i know the right logical solutions for the problem after reading it ??

thnxxx

>i have a problem in programming
Pretty much every thread in this forum is based on a 'problem in programming', try to be more descriptive next time you make a new thread.

>how can i know the right logical solutions for the problem after reading it ??
That didn't make much sense to me. Is there a specific problem you're having, or is it just a really vague question? If there's an actual problem, post code and give more information.

sorry i'm not very good in english

but there is no actual problem but i'm talking at general
when i see a problem and want solve it by c++ how can i write the right solution to it ?

sorry i'm not very good in english

but there is no actual problem but i'm talking at general
when i see a problem and want solve it by c++ how can i write the right solution to it ?

Give us an example of what problem you're seeing ...

Is this just another "please-do-my-homework" request or what ?

no it's not

>sorry i'm not very good in english
Don't worry about it :)

And as for your question, it depends entirely on what the problem is.

>how can i write the right solution to it ?
Understand what's causing the problem, and think of a way to fix it.
Use the internet to help you.

To the OP:
As it has been said: Programming is an Art.
Some have god gifted talent in programming. Others develop their talent by practicing more problems.
It is simply not possible for us to solve this problem (of having non-logic mind in programming.)

Learn how to program is exercising, the more you exercise the better you'll be, but there aren't any tricks/rules to learn how to logically solve a problem (except abstraction, where you break a problem down to several easy to understand parts) ...

thnxxx 4 all your words really helps me

and hope to see more reaplies to Benefit from your Experience in programming

It is not a problem to write a code without errors , but the point is that either your goal for writing program is accomplished or not , for this thoroughly read the problem agian an gain until ou understand what u are supposed to do, then write its algorithm on paper , after that u are ready to code. Direct coding is not a good practice.

Logic is real understanding of what you are trying to accomplish , and the structure of arguments.
Analyze a problem, express its essence abstractly, sort through information, make connections, recognize patterns...
Your ambitions should comfort you in problem solving.

This article has been dead for over six months. Start a new discussion instead.