# Search:

Type: Posts; User: Sir Andus

1. ## Thread: Psuedo random numbers in a bubble sort.

by Sir Andus
Replies
10
Views
4,839

### Yup, that was it. I can't believe I didn't catch...

Yup, that was it. I can't believe I didn't catch that.
2. ## Thread: Psuedo random numbers in a bubble sort.

by Sir Andus
Replies
10
Views
4,839

### Well, using a bubble sort and timing how long it...

Well, using a bubble sort and timing how long it takes is the point of this program, so using another one wouldn't really suffice.
3. ## Thread: Psuedo random numbers in a bubble sort.

by Sir Andus
Replies
10
Views
4,839

### Ok, so I got random to work, but my bubble isn't...

Ok, so I got random to work, but my bubble isn't working now. It seems to be exiting the function before it does any sorting because I get the same order I had before the sort as I have afterwards. ...
4. ## Thread: Psuedo random numbers in a bubble sort.

by Sir Andus
Replies
10
Views
4,839

### int n = 10; int a[10] = { 1, 2, 3, 4, 5, 6, 7,...

int n = 10;
int a[10] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

So I change it to a static array but I still get the message:

[Linker error] undefined reference to `print(int*, int)'
5. ## Thread: Psuedo random numbers in a bubble sort.

by Sir Andus
Replies
10
Views
4,839

### Psuedo random numbers in a bubble sort.

Basically, I'm unsure of how to utilize the function rand(). All I want to do is create 20 random numbers, use a bubble sort on them, print the sorted list and the time it takes to sort it.

...
6. ## Thread: class templates in main()

by Sir Andus
Replies
2
Views
710

### class templates in main()

So I understand how templates work, but I don't understand how to use them in a main (or at least the syntax I need to use them).

#include <cstdlib>
#include <iostream>

using std::cout;...

by Sir Andus
Replies
5
Views
1,338

### But what does this mean?

But what does this mean?

by Sir Andus
Replies
5
Views
1,338

### Nested structs

I am having trouble getting my nested structs to print. I want the phone struct to print, but I'm not quite sure how to format it. I'm thinking it's what I did when I actually created the struct,...
9. ## Thread: How to rearrange values in a string?

by Sir Andus
Replies
6
Views
4,983

### Ok, so I've improved the structure of the program...

Ok, so I've improved the structure of the program so that it finally makes sense, but I'm still having a run-time error. It gets to the first printf statement, but then the window suddenly crashes....
10. ## Thread: How to rearrange values in a string?

by Sir Andus
Replies
6
Views
4,983

### This is what I was hoping to illustrate but I...

This is what I was hoping to illustrate but I guess it didn't work out so well.

Anyways, thanks for the help so far! One the bright side, my lastest build can atleast compile now. The only...
11. ## Thread: How to rearrange values in a string?

by Sir Andus
Replies
6
Views
4,983

### How to rearrange values in a string?

I've been trying to manipulate strings as of recently, but with very little success. The program I've been working on is supposed to take a predetermined string and remove the character indicated. ...

by Sir Andus
Replies
7
Views
1,764

### Ok, everything is in working order except for the...

Ok, everything is in working order except for the EOF occuring before the sentinel value message. Since I call the read_eles function twice, the second time it calls it, the sentinel value has...

by Sir Andus
Replies
7
Views
1,764

### Using pointers instead of subscripts for arrays

For this, I was supposed to build a program that read arrays from pointers instead of subscripts. At the highlighted location, I was having an error that said: [Warning] initialization discards...
14. ## Thread: Having trouble printing from an array

by Sir Andus
Replies
2
Views
1,297

### Wow, I feel kind of stupid now for missing that. ...

Wow, I feel kind of stupid now for missing that. Thanks a lot though.
15. ## Thread: Having trouble printing from an array

by Sir Andus
Replies
2
Views
1,297

### Having trouble printing from an array

I'm not sure what I'm doing wrong, but there seems to be some problems occuring before the print function. The only times it will print the values is if the array is full yet it still has some...
16. ## Thread: How to flush invalid characters?

by Sir Andus
Replies
2
Views
1,159

### How to flush invalid characters?

I've been working on this project for my class for a few days now, but I can't seem to figure out one thing; how to flush non-numerical input. The program is supposed to error check this, but I...
17. ## Thread: Unknown Math Issues.

by Sir Andus
Replies
1
Views
1,799

### Unknown Math Issues.

As of lately, I've been just messing around with C++ just basically trying to grasp how to do various tasks with it. Earlier this week, I decided to write a program that had to do with the quadratic...
Results 1 to 17 of 17