The "type" effect [Noob friendly]
You claim that Unmanaged is trash on your others threads, or say some other random things in different threads, but now you are saying that it is your 2nd time using arrays on a unmanaged language... Ok... ._.
You either don't really know that much about programming yet... or... You use arrays more often than you know.
You either don't really know that much about programming yet... or... You use arrays more often than you know.
I haven't, EVER made any threads complaining about managed code.
Arrays serve purposes, if these purposes don't live up to my projects, i wont use them. However, MAYBE i have used Arrays more....-.- Um. But i can't really remember.
EDIT: You must be kidding, when you claim that it have to have used them. You do realize, that they're only used to within, hold different values of same datatype??
Arrays serve purposes, if these purposes don't live up to my projects, i wont use them. However, MAYBE i have used Arrays more....-.- Um. But i can't really remember.
EDIT: You must be kidding, when you claim that it have to have used them. You do realize, that they're only used to within, hold different values of same datatype??
If he uses this:
It should work "better". (more efficient)
(I just edited his code, I would have done it differently)
Oh and @VirtualDUDE and int (int slow_print()) must return a value or it should be a void.
Code:
#include <cstdlib>
#include <iostream>
#include <string>
#include <windows.h>
using namespace std;
const int PF = 12;
void slow_print();
int main()
{
slow_print();
cin.get();
cin.ignore();
return EXIT_SUCCESS;
}
void slow_print(){
int speed;
char my_string[PF] = "Hello World";
cout << "How fast do you want the printing effect to appear? (in seconds): ";
cin >> speed;
int sec = speed * 1000;
int a = 0;
for (int l = 0; l < PF; l++){
Sleep(sec);
cout << my_string[a];
a++;
}
};
(I just edited his code, I would have done it differently)
Oh and @VirtualDUDE and int (int slow_print()) must return a value or it should be a void.
Yea yea. Voids always return false...I fucking know that...Dude shoot me
i where only trying to give an example of the effect..It's not at all, supposed to be perfect. It's merely an example, i wrote when i where bored.
EDIT: Dude...The sleep function runs in MS not S (Milliseconds) So why'd you edit it to Seconds?
NVM forgot to read: Sec (times) 1000
i where only trying to give an example of the effect..It's not at all, supposed to be perfect. It's merely an example, i wrote when i where bored.EDIT: Dude...The sleep function runs in MS not S (Milliseconds) So why'd you edit it to Seconds?
NVM forgot to read: Sec (times) 1000
Okay... I use arrays in like, every single project I do, big or small. I don't understand how you would not use them in any non-20-lines-of-code project. (I'm taking arrays here in the sense of ol' fashioned arrays, linked lists and dynamic ones... because, they're all arrays of data)
Or they can hold a pointer to any datatype
void doesn't return anything.
proof:
void v() { }
bool b = v(); // fail D:
Or they can hold a pointer to any datatype

void doesn't return anything.
proof:
void v() { }
bool b = v(); // fail D:
I hope you get bounds errors and realize that you need to gtfo and learn, you spam on the programming subforum too much for somebody who sucks so much at programming,

Good for me indeed =X