-
Replied To a Post in One simple question to refresh back ur skills.
Control statements need: 1) an identifier (if, else, switch, for, while, etc) indicating this is a control statement 2) a condition (or conditions) that must be met for the following … -
Replied To a Post in function (method in java) for c/c++ programmer
I don't do much programming in Java. But here's how I think about it, though it's bound to be off somewhere. In Java each function is a class. It has … -
Replied To a Post in Reading words from text
Also: ask yourself--- 1) how does getline() know when to stop extracting information from the input stream? 2) What can you do to avoid default behavior, if you want to? … -
Replied To a Post in post looping question
It looks like you are trying to do everything at once without taking the time to learn the details. For example, you can declare variables global before declaring main(), but … -
Replied To a Post in Sum of Digits !!
Use the if/else statement after completing the while loop. -
Replied To a Post in what is the logical meaning of (return;)
It means "don't return anything". Similar to empty parameter brackets when declaring/calling functions. It can make code easier to read, particularly if you get into the habit of using only … -
Replied To a Post in Need help to create c++ program to merge two linked list
If I understand you right you've got three possible options, as I see it. 1) you can declare merge() as a member function that mutates "this". 2) you can declare … -
Replied To a Post in Need help to create c++ program to merge two linked list
Since you have a list3 listed I assume you want to create a third list representing the merged lists, leaving the initial lists intact. So: 1) let curr1 work down … -
Replied To a Post in ABOUT THE EVEN NUMBERS
If you move the ouptut statement outside of the for loops, then you should always print out the lowest value in the matrix. If you want to out put the … -
Replied To a Post in string array alphabetical order
There are multiply implementations for what we call strings. One version is C style strings, also called nulled terminated char arrays. You can't compare or display all elements of an … -
Replied To a Post in c_str
Well, there are many types of strings. In standard C and C++ they are null terminated char arrays, meaning the null char needs to be the last char of the … -
Replied To a Post in empId
Looks like you had trouble posting the code. Please try again. Learning to debug is as a crucial aspect to successful coding. If you don't know how, then now is … -
Replied To a Post in nested for loop c++
1) No reason to use the key word static, that I can see anyway. 2) Some compiler implementations might default elements in arrays of type int to a value of … -
Replied To a Post in Convert text to code c++
The nested loop idea is fine, but many of the details are wrong. First the while loop is not doing anything, so why have it. Second, you are missing a … -
Replied To a Post in Why would you want to make class objects parameters of a function
To pass information, and maybe change values in passed parameters where changes are retained outside the current function. -
Replied To a Post in Maze using asterisks, 2-D Array
Put the nested loop to print out the board in a separate function. When using the smaller board be sure you don't go out of bounds by using indexes relevant …