Thanks that works now, yes your right the -1 was not ment to be there, i copied a stub from somewhere else in the code nice job :) saved me lots of headaches.
edit: salem your on the money 99% of...
Type: Posts; User: robid1
Thanks that works now, yes your right the -1 was not ment to be there, i copied a stub from somewhere else in the code nice job :) saved me lots of headaches.
edit: salem your on the money 99% of...
Thanks for the input, but that seems to make it worse, now only displaying 1 random number and following 0's. Is there a way to copy one element at a time and just loop it?
Here is the code:
// set the array with values of 0
for (int index = 0; index < NumElements -1; index++) {
OriginalArray[index] = 0;
}
// forget about pure random at the moment
my random.h consists of one line the same as the first post. Its just a prototype of one function, exactly the same code has given me 3 different errors, on the one line where i call the function....
Update:
When added a comment to your code and tried to recompile it died - Just for reference, future problems.
[Linker error] undefined reference to `__gxx_personality_v0'
resonable...
Thats insane it works when you code it.
Ill just keep going with these files.. heh thanks mate *scratches head*
Thanks but nah does not seem to work, this has me totally baffled. Ill just use the painful unix box untill i can figure it out dont have time to keep playing with it at the moment, thanks for all...
Project actually, this is the first time ive needed to use more then one file (if you get me) and i did it as a project. ill try it another way
Argh,
Uninstalled 4.9.9.0 and reinstalled it, same problem
Went back to 4.9.8.0 and it has the same again.
Dev-C++ 4.9.9.0 the latest version, i might need to go back one coz i just tried it on a solaris 5.* box and it had a few warnings like double lined comment? (dunno?) but compiles... weird
I have 3 files
main.cpp
random.cpp
random.h
they contain this:
main.cpp -
never mind, good old tutorials helped me out.
Quick Question:
Can inline functions 'use' a protoype?
E.G.
inline func(blah);
...
code
Thanks for that in-depth reply, Much clearer.
In my lecture notes it says
double array[1000000]; //should take 8Mbytes
When in fact this does not make an executable of 8mb, this it tells me though it does not say why and i was not at the...
Ill throw my code at you first
int menu(int &answer)
{
do {
cout << "----Menu----" << endl
<< "1 something" << endl
<< "2 something" << endl
Yep that works thank you.
Yeah i cant use getline :( This is homework given to me.
Thanks for your help though, i know how the board feels about homework i just need a kick in the right direction this function in relation to...
I have searched the board but cant seem to find my problem sorry if im repeating old problems.
I can not seem to get the first cin.get(numerator); to get its input, seems to like.. skip it.. i...
Thank you.
here is my code:
int menu(void)
{
int answer = 0;
do {
cout << "----Menu----" << endl
More specific to Wollongong UNI, I was wondering what the costs are these days for a person to attend the uni in the course of Computer Science? Besides the books etc the cost of the course is what...
Windows Xp
Dev-C++ 4.9.8.0
I only hear bad things about scanf...
thanks for all your help though... :)
here is my new code, if anyone has any more help thats great, if not no worries.
#include <stdio.h>
int main()
{
char username[9], /* user names can not exceed higher then 8 characters...