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?
University Multimedia University Thread V3, For any problems and discussions
University Multimedia University Thread V3, For any problems and discussions
|
|
Nov 6 2011, 06:25 PM
Return to original view | Post
#361
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
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?
|
|
|
|
|
|
Nov 6 2011, 08:29 PM
Return to original view | Post
#362
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
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 |
|
|
Nov 6 2011, 09:56 PM
Return to original view | Post
#363
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
What is your question can ellaborate more??
|
|
|
Nov 7 2011, 11:00 AM
Return to original view | Post
#364
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
IT also got learn calculus lol , call discrete calculus
|
|
|
Nov 7 2011, 11:42 AM
Return to original view | Post
#365
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
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
|
|
|
Nov 7 2011, 04:16 PM
Return to original view | Post
#366
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
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
|
|
|
|
|
|
Nov 7 2011, 06:06 PM
Return to original view | Post
#367
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
Yeah i say IT do learn discrete calculus , any wrong??
|
|
|
Nov 7 2011, 10:24 PM
Return to original view | Post
#368
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
Sick already
|
|
|
Nov 8 2011, 12:48 AM
Return to original view | Post
#369
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
fet.mmu.edu.my
|
|
|
Nov 8 2011, 12:19 PM
Return to original view | Post
#370
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
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. LOL i've this idea in september 28 , before i join MMUlets 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. http://stackoverflow.com/questions/7579069...e-c-programming caramel23 is me. This post has been edited by kailoonthedog: Nov 8 2011, 06:20 PM |
|
|
Nov 8 2011, 07:33 PM
Return to original view | Post
#371
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
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
|
|
|
Nov 8 2011, 07:34 PM
Return to original view | Post
#372
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
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 |
|
|
Nov 8 2011, 07:54 PM
Return to original view | Post
#373
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
I didnt even say garbage collection , what i say is garbage value
|
|
|
|
|
|
Nov 9 2011, 12:32 AM
Return to original view | Post
#374
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
I receive bad news today , my gf told me she have my baby ..........
|
|
|
Nov 9 2011, 06:21 PM
Return to original view | Post
#375
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
Headache and sick now , really don't wanna talk over it
|
|
|
Nov 9 2011, 10:25 PM
Return to original view | Post
#376
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
In cyberjaya don't expect to get nice food in uni
|
|
|
Nov 10 2011, 05:39 PM
Return to original view | Post
#377
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
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??
|
|
|
Nov 11 2011, 12:01 AM
Return to original view | Post
#378
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
Multimedia University , LOLOLOLOLOL , TROLLLLL
|
|
|
Nov 11 2011, 03:27 AM
Return to original view | Post
#379
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
Senior Member
2,470 posts Joined: Nov 2007 |
Tomorrow quiz don't forget for discrete structure
|
|
|
Nov 11 2011, 10:50 AM
Return to original view | Post
#380
|
![]() ![]() ![]() ![]() ![]() ![]() ![]()
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
|
|
Topic ClosedOptions
|
| Change to: | 0.0362sec
0.55
7 queries
GZIP Disabled
Time is now: 27th November 2025 - 02:49 PM |