I would say you need to be comfortable using/creating functions, using arrays, using loops, and conditional statements before you take this on.
EDIT: (would arrays be the best way to store the...
Type: Posts; User: mabufo
I would say you need to be comfortable using/creating functions, using arrays, using loops, and conditional statements before you take this on.
EDIT: (would arrays be the best way to store the...
Are you able to pass the '\n' bit, (I forget the word for it) to the text file? And by doing so, start on a new line?
When using a pre set value to set the size of an array - the integer that you use must be of type constant. IE:
const int num = 10;
int array[num];
I hope that explains your error.
Well yeah, that's fine - but I want to do something like that on my own. A bit of a learning experience if you will.
EDIT: The program that I had on my computer was not netstat but a free tool...
I'd like to create a program that monitors processes that are running on what ports on my computer. I actually had a program on my computer, though I can't recall who made the thing.
Again, I...
Idea: Get a real job.
Very neat little program! Pretty nice concept I must say! Though I am sad that my computer's name is DESKTOP-1. Sort of depressing eh?
Yikes, what was I thinking? :o
EDIT: ...and I've just fixed it - thank you for the help!
Now that I'm over my fear of random numbers I'm working on the next exercise in my book.
Exercise 5-6:
A lottery entry requires you to choose six different integers in the
range 1 to 49...
Boy do I feel silly! Thanks!
Right, I haven't been working long and I've come up with this so far, no compile errors - just logic problems.
// 48 - 122
#include <cstdlib>
#include <ctime>
#include <iostream>
using...
I see... It's making more and more sense now.
EDIT:
n = rand()%(size_of_range)+first_number_inrange
It makes perfect sense now.
I understand a little better now, still fuzzy though!
So let me get this straight. If I wanted to get a random number - say, 1-10. I would do this:
{
srand(time(NULL));
int n = 0;
...
The thing that's confusing me is the random part of the whole thing. This is the first program that I've generated a random value with... well pseudorandom rather. Anyway, I did a little reading on...
Thanks fellas, you're ideas have helped.
I haven't learned arrays yet... :mad:
EDIT: But there has to be an easier way than the one I suggested.
For this exercise creat a program that outputs a password
consisting of sequence of 8 randum upper or lowercase letters or
digits. Duplicate characters are permitted.
My question is, that...
I see, that makes a lot more sense. Thank you.
The program posted above - I see where I was mistaken considering the loop counts the characters one by one... what confused me though about what char could store is that if I entered an entire...
I can tell what the thing does, thank you. I was more than a bit confused is all - thanks for the help I guess.
I think that I'm just thinking about these way too hard... time for a break I suppose.
I think what we have here is a failure to comunicate. I caved - I looked at the source code and I have to say, I'm suprised at the solution.... Here it is:
// Exercise 5.3 Using a do-while...
I thought you said I wasn't supposed to store it? :confused:
I see. The problem with that though - is I have no idea how to extract something from the input buffer,in fact, I'm not sure what that is - as that was not in the book.
I'm still not sure how to store a statement that the user enters as type char. *or however I need to format it so I can break it apart with a loop that detects letters.