Welcome Guest ( Log In | Register )

Bump Topic Topic Closed RSS Feed
23 Pages « < 17 18 19 20 21 > » Bottom

Outline · [ Standard ] · Linear+

University Multimedia University Thread V3, For any problems and discussions

views
     
kailoonthedog
post Nov 6 2011, 06:25 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
hmm??I thought just declare it , after that it's to your mean to put whatever type of value into it , and later on you can reassign it to another type?
kailoonthedog
post Nov 6 2011, 08:29 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
type casting should be "(int) variable " zzzz , anyway what do you mean by combining all??


Added on November 6, 2011, 8:39 pmeach variable declaraction should be specify by the type because compiler need to know what will be store in that portion of memory and the size of memory can be determine and allocateed to respective type.Even if you use array it only create an adjacent of memory with only one type.The only way of grouping string , integer floating point etc is to use structure.That is

CODE
struct example
{
 int num;    // everything inside curly braces is the structure member
 float value;
 string name;
 char arr[20];
};


and can be used using
CODE

example FirstInput =
{
 20 ,          // initialization.
 1.2 ,
 "kailoontedog" ,
 "handsome"
};


and it can be access using

CODE
cout << FirstInput.num << endl << FirstInput.value << endl<<FirstInput.name <<
endl << FirstInput.arr << endl;


This post has been edited by kailoonthedog: Nov 6 2011, 08:39 PM
kailoonthedog
post Nov 6 2011, 09:56 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
What is your question can ellaborate more??
kailoonthedog
post Nov 7 2011, 11:00 AM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
IT also got learn calculus lol , call discrete calculus
kailoonthedog
post Nov 7 2011, 11:42 AM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
Well IT and Computer science just a name buddy , different uni have different opinion on the name , some say their course is CS but it's SE alike because all they do is teach more and focus more on programming big application , some CS is focus on computer math one , everything is uni oriented we cannot determine just by its name

kailoonthedog
post Nov 7 2011, 04:16 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
Well i've already say those name ain't important , it's depend on how the specific uni view it . Some uni say the course is CS but they focus more on programming
kailoonthedog
post Nov 7 2011, 06:06 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
Yeah i say IT do learn discrete calculus , any wrong??

kailoonthedog
post Nov 7 2011, 10:24 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
Sick already sad.gif , hope to recover tomorrow
kailoonthedog
post Nov 8 2011, 12:48 AM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
fet.mmu.edu.my
kailoonthedog
post Nov 8 2011, 12:19 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
Today whole day no class lol


Added on November 8, 2011, 6:20 pm
QUOTE(teohzl @ Nov 7 2011, 08:04 PM)
I have a little suggestion here.

lets say you have 4 type which are int, char, double, float

1. Remember that your variable is declared in function which their memory will be reclaim once returned, but not erase. So the easy way will be return a pointer of the first variable you assign which is the "int", by then point to after int will give u the char, double, float and so on.

2. The actual way which is safe, is to use "malloc" and give it a sizeof(int+char+double+float) which will return u a pointer that can be returned and use. The pointer is a "void" pointer which you can use as anything, which allows u to determine how is it. But remember do use "free" once u finish or else memory leak might occur.
*
LOL i've this idea in september 28 , before i join MMU

http://stackoverflow.com/questions/7579069...e-c-programming

caramel23 is me.

This post has been edited by kailoonthedog: Nov 8 2011, 06:20 PM
kailoonthedog
post Nov 8 2011, 07:33 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
After cleared we still can access it just with garbage value(other program uses it) , the memory is addressed by the cpu before it's use by us so the portion of the memory address we accessed is still the same it won't tell you the memory address doess not exist after the value stored in it is clear
kailoonthedog
post Nov 8 2011, 07:34 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
Anyway you OCT intake too @teohzl??

This post has been edited by kailoonthedog: Nov 8 2011, 07:36 PM
kailoonthedog
post Nov 8 2011, 07:54 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
I didnt even say garbage collection , what i say is garbage value

kailoonthedog
post Nov 9 2011, 12:32 AM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
I receive bad news today , my gf told me she have my baby ..........
kailoonthedog
post Nov 9 2011, 06:21 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
Headache and sick now , really don't wanna talk over it
kailoonthedog
post Nov 9 2011, 10:25 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
In cyberjaya don't expect to get nice food in uni
kailoonthedog
post Nov 10 2011, 05:39 PM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
They say plagarism is an offence , and touchscreen already invented years ago , but why got MMU student create touchscreen software for FYP but still get nominated for it??Is it some sort like Why wanna reinvent the wheel??
kailoonthedog
post Nov 11 2011, 12:01 AM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
Multimedia University , LOLOLOLOLOL , TROLLLLL
kailoonthedog
post Nov 11 2011, 03:27 AM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
Tomorrow quiz don't forget for discrete structure
kailoonthedog
post Nov 11 2011, 10:50 AM

I have no super cow power~~~
*******
Senior Member
2,470 posts

Joined: Nov 2007
LOL the quiz not today i mislook , lecturer Ong says the quiz should be one week have and another rest , that's mean this week rest and next week quiz

23 Pages « < 17 18 19 20 21 > » Top
Topic ClosedOptions
 

Change to:
| Lo-Fi Version
0.0362sec    0.55    7 queries    GZIP Disabled
Time is now: 27th November 2025 - 02:49 PM