Am having problems converting from if-else statements to switch statements and vice-versa

Do you have an example of what you're having trouble converting? A sepcific case makes it easier to clarify things for you.

switch to if-else is fairly straightforward. However, if-else to switch can be problematic depending on the format of your conditions. switch will only accept integer values to the case statements.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.