Search:
Type: Posts; User: cozySam
Search:
Search took 0.02 seconds.
-
October 3rd, 2016, 07:57 AM
I need to set the first to be greater than last? That should stop it.
But I used a return instead. This is what I have now:
int main()
{
// Create an array of 100 elements
int...
-
October 3rd, 2016, 05:32 AM
I almost have it now. But I keep going around the loop even after finding the correct number. How do I prevent this?
int main()
{
// Create an array of 100 elements
int arr[100];
...
-
October 2nd, 2016, 07:40 PM
I think I found the problem. Here is the solution:
int main()
{
int arr[100];
// For setting values to elements
for (int i = 0; i < 100; i++)
-
October 2nd, 2016, 06:00 PM
Hello!
I'm trying to create an array of 100 elements, ranging from 1 to 100.
int main()
{
int arr[100];
// For setting values to elements
-
October 2nd, 2016, 05:50 PM
Integer division and integer quotient! That's interesting. I suppose that's a completely different way to view this.
But you got me confused by (dividend -= divisor). How should I read this, from...
-
October 2nd, 2016, 03:25 PM
Hello!
#include <iostream>
using namespace std;
int main()
{
int a = 9;
int b = a/2;
-
October 2nd, 2016, 06:12 AM
I have learned some programming fundamentals on my own and I took a basic Python course before I started with this C++ course.
Yes, it's from the C++ course I'm taking. It's from the course...
-
September 30th, 2016, 12:48 PM
Alright, so this is what I think might be going on.
This is what the address range for the char vector nameVector might be and what the values might be.
Address Value
=================...
-
September 30th, 2016, 11:36 AM
This is also the confusing part for me. How does the compiler store the literal "John" in memory? As a char vector? So this is why I don't have to declare a new char vector e.g. char nameVector[];...
-
September 30th, 2016, 11:31 AM
Let me quote 2kaud here, maybe you will see what I mean.
-
September 30th, 2016, 10:45 AM
Alright, so name is a char pointer. And where is it pointing to? Where is the char that cahr* points to?
Why is there no char declaration?
-
September 30th, 2016, 06:02 AM
Hello!
This function is supposed to have input but no output. I really want to understand how this works. Can someone help me fill in the gaps?
#include <iostream>
using namespace std;
...
-
September 23rd, 2016, 06:13 AM
I have covered while loops, and I have seen for loops in other examples with other languages. But I have not worked with it yet with C++ in this course.
-
September 23rd, 2016, 06:12 AM
The second example worked for me. So it needed that inclusion.
-
September 23rd, 2016, 06:09 AM
I am using Code Blocks with MinGW (GCC) compiler.
-
September 22nd, 2016, 03:22 AM
Can someone work through the "binary search" alg. with me here mentally? What's going on? How does it work? I know intuitively how it works, but I want to see the math in this.
So the range is 1...
-
September 22nd, 2016, 03:09 AM
#include <iostream>
using namespace std;
int main()
{
cout << "Think of a number between 1 and 100. Press ENTER when ready." << endl;
int answer, currentNumber=50;
-
September 22nd, 2016, 02:34 AM
Do I have to store the return value from cin before I use it in a test?
cin >> a;
if(a<b)
{
cout << "Hello!";
}
-
September 22nd, 2016, 02:28 AM
"Error! System was not declared in this scope."
I hve put it in the main, right after the first printout line.
-
September 22nd, 2016, 02:25 AM
Hello!
Perhaps an edit button would be a good idea?
-
September 22nd, 2016, 02:23 AM
No edit button?... alright, good to know.
-
September 22nd, 2016, 02:22 AM
Replying to thread...
"This forum requires that you wait 30 seconds between posts. Please try again in 7 seconds."
ok...
-
September 22nd, 2016, 02:22 AM
-
September 22nd, 2016, 02:12 AM
How do I make a program pause and wait for me to press a key before it continues?
Right after the first printout I want it to pause, and then continue when I have pressed Enter. How do I do that?
-
September 21st, 2016, 10:06 AM
Hello everyone!
I am new to these forums. I come here today because I need help with a C++ programming assignment for school, and in the long term I also hope to find some mentors and friends...
|
Click Here to Expand Forum to Full Width
|