The "type" effect [Noob friendly]

Posts 16–30 of 37 · Page 2 of 3
Quote Originally Posted by 'Bruno View Post
2nd time using Arrays... ok...
First time, was for my Dictionary. Second time is this....
What's the problem? I haven't had much to use it for, for what I'm making...
Else, I've always found a way around them...
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.
Quote Originally Posted by 'Bruno View Post
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.
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??
Quote Originally Posted by VirtualDUDE View Post
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??
You should read again the post. I didn't say that you have to use them. Don't come trying to teach me what an array is when you have used them 2 times only. The irony...
Quote Originally Posted by 'Bruno View Post
You should read again the post. I didn't say that you have to use them. Don't come trying to teach me what an array is when you have used them 2 times only. The irony...
So you know more about them, than i do? Good for you
Quote Originally Posted by VirtualDUDE View Post
So you know more about them, than i do? Good for you
Good for me indeed =X
Quote Originally Posted by 'Bruno View Post
Good for me indeed =X
Stop loosing your time with him ; He got dropped as a Child ; It isn't his fault.
Quote Originally Posted by Hell_Demon View Post
#1: Because then cout would print the whole string at once.
#2: Why should he? defines are fine :3
If he uses this:

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++;
	}    
};
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.
Quote Originally Posted by Omar the Sand****** View Post


If he uses this:

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++;
	}    
};
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.
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
Quote Originally Posted by VirtualDUDE View Post
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 did it because a lot of people for some reason don't know what milliseconds are
Quote Originally Posted by VirtualDUDE View Post
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.
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)

Quote Originally Posted by VirtualDUDE View Post
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??
Or they can hold a pointer to any datatype


Quote Originally Posted by VirtualDUDE View Post
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
void doesn't return anything.


proof:

void v() { }
bool b = v(); // fail D:
Quote Originally Posted by Omar the Sand****** View Post


I did it because a lot of people for some reason don't know what milliseconds are
Mate, i believe they're called retarded idiots
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,
is this toturial for noobs who just started C++ because i dont understeand this...

i just do it whit cout
Quote Originally Posted by proman98 View Post
is this toturial for noobs who just started C++ because i dont understeand this...

i just do it whit cout
Not a tutorial, just a share. Yes it's for people who are new to C++ Kind of like myself...
Posts 16–30 of 37 · Page 2 of 3

Post a Reply

Tags for this Thread

None

Talk with us