No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
11 Posted Topics
I want count the elements in a srand generated array. The array is char array. Can anyone advise me on my void countElements (char* a, int size) function as it don't work? TIA. [CODE] #include <iostream> #include <ctime> #include <cstring> #include <cstdlib> using namespace std; const int MAX = 10; … | |
If I have a string. String msg = "I love mickey mouse"; What method can I used to display the string, "mickey"? | |
I want to write a java program to read in two integers and then output a random integer number generated between these two integers. Is there any tips? Is there a random Java API (libraries) that I could use? Tks. | |
[CODE] #ifndef Test_h #define Test_h #endif [/CODE] May I know what are the above 3 syntax for? How can I use it? Is is used only in header file? | |
I am exploring to add an element, ASCII letters to my random generated 1D array to form new array. How can I use <cstring> header to achieve my result. [CODE] #include <iostream> #include <ctime> #include <cstring> #include <cstdlib> using namespace std; const int MAX = 10; void constructSet1 (char*, int); … | |
"I am trying to display an array of digits using rand. My final result need to be: 1) Output all digits <=40 to the left side of array 2) Output digits > 40 to the right side of array Prob: The random digits does seems to change & result incorrect … | |
I would like to know how can the swapping function be implemented using pointers, void swap (int*, int*) [CODE] //function prototypes void swap(int& a, int& b); //function (passing by ref) void swap(int& a, int& b) { int t = a; a = b; b = t; }[/CODE] Is this correct? … | |
'a' was not declared in this scope. I can't spot the error. Pls advise. [CODE] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; const int MAX = 10; void constructArray_2 (int*, int); int main () { srand (time (NULL)); constructArray_2 (a, MAX); } void constructArray_2 (int *a, int size) … | |
[CODE] #include <iostream> #include <cstdlib> #include <ctime> #include <cstring> using namespace std; struct UKStudent { char name [30]; int noTest; float mark [10]; int final; char grade [30]; }; struct OverseasStudent { char country [30]; char name [30]; int noTest; float mark [10]; int final; char grade [30]; }; union … | |
I am doing a program to get a sample infile.txt & ouput to outfile.txt I encountered alot of probs which I can't solve now. I am having issues reading from infile.txt & display the correct result in outfile.txt Pls enlighten me further. The program have to submit this Tue. My … | |
Re: How can I apply the code in C language to my thread using c++? My thread: http://www.daniweb.com/forums/thread256470.html Many thanks! |
The End.