Click here to Skip to main content
16,006,065 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralChar* -> DWORD conversion Pin
__Cerb22-Apr-04 11:14
__Cerb22-Apr-04 11:14 
GeneralRe: Char* -> DWORD conversion Pin
ravjak22-Apr-04 11:28
ravjak22-Apr-04 11:28 
GeneralRe: Char* -> DWORD conversion Pin
__Cerb22-Apr-04 11:31
__Cerb22-Apr-04 11:31 
GeneralRe: Char* -> DWORD conversion Pin
Michael Dunn22-Apr-04 16:42
sitebuilderMichael Dunn22-Apr-04 16:42 
GeneralProblem overloading operators in templated classes Pin
22-Apr-04 10:36
suss22-Apr-04 10:36 
GeneralRe: Problem overloading operators in templated classes Pin
mjackson1122-Apr-04 12:29
mjackson1122-Apr-04 12:29 
GeneralTest your C++ knowledge with these questions! Pin
soer22-Apr-04 10:17
soer22-Apr-04 10:17 
GeneralRe: Test your C++ knowledge with these questions! Pin
Navin22-Apr-04 10:39
Navin22-Apr-04 10:39 
soer wrote:
1) Identify any errors in the following declarations.

a. int x[4] = { 8,7,6,4,3 };
b. int x[] = { 8,7,6,4 };
c. const int SIZE = 4;
int x[SIZE];


Yes, the array x is being defined 3 different times.


soer wrote:
2) What is wrong with the following piece of code?

int sample_array[10];


You should be using std::vector instead of a static array.


soer wrote:
3) Suppose we expect the elements of the array a to be ordered so that
a[0] <= a[1] <= a[2] <=…

for (int index = 0; index <10; index++)
if(a[index] > a[index +1])
cout <<”Array elements”<<index<<” and”="" <<="" (index="" +1)<<”are="" out="" of="" order.”;<="" i="">

Yes, there is no space between the words and the numbers being printed out.


soer wrote:
4) Consider the following function definition:

Void tripler(int& n)
{
n=3*n;
}


That should be:
n *= 3;
and "Void" should have a lower-case v.


soer wrote:
5) What (if anything) is wrong with the following code? The definition of tripler is given in #11.

int b[5]={1,2,3,4,5};

for (int i=1;i<=5;i++)
tripler(b[i]);


The line containing "tripler" is not indented properly.


soer wrote:
6) Which of the following are acceptable function calls?

too2(my_array, 29);
too2(my_array, 10);


The function name is incorrect. It should be "tutu".

So how did I do? Big Grin | :-D Big Grin | :-D


Sometimes I feel like I'm a USB printer in a parallel universe.

GeneralRe: Test your C++ knowledge with these questions! Pin
Antony M Kancidrowski22-Apr-04 10:58
Antony M Kancidrowski22-Apr-04 10:58 
GeneralRe: Test your C++ knowledge with these questions! Pin
ravjak22-Apr-04 11:33
ravjak22-Apr-04 11:33 
GeneralRe: Test your C++ knowledge with these questions! Pin
soer22-Apr-04 16:21
soer22-Apr-04 16:21 
GeneralRe: Test your C++ knowledge with these questions! Pin
FlyingDancer22-Apr-04 14:27
FlyingDancer22-Apr-04 14:27 
QuestionHow to display a transparent PNG using CxImage??? Pin
randythawkins22-Apr-04 9:21
randythawkins22-Apr-04 9:21 
Generaldrawing dot and rect Pin
lvidot22-Apr-04 7:22
lvidot22-Apr-04 7:22 
GeneralRe: drawing dot and rect Pin
jmkhael22-Apr-04 7:32
jmkhael22-Apr-04 7:32 
GeneralTrace to Output window or Command Window in MSDEV Pin
pny22-Apr-04 7:02
pny22-Apr-04 7:02 
GeneralRe: Trace to Output window or Command Window in MSDEV Pin
jmkhael22-Apr-04 7:08
jmkhael22-Apr-04 7:08 
GeneralRe: Trace to Output window or Command Window in MSDEV Pin
pny22-Apr-04 8:00
pny22-Apr-04 8:00 
GeneralRe: Trace to Output window or Command Window in MSDEV Pin
David Crow22-Apr-04 9:28
David Crow22-Apr-04 9:28 
GeneralRe: Trace to Output window or Command Window in MSDEV Pin
pny22-Apr-04 20:25
pny22-Apr-04 20:25 
GeneralRe: Trace to Output window or Command Window in MSDEV Pin
Michael Dunn22-Apr-04 16:45
sitebuilderMichael Dunn22-Apr-04 16:45 
GeneralCMapStringToOb problem in MFC COM DLL Pin
Ed K22-Apr-04 6:35
Ed K22-Apr-04 6:35 
GeneralRe: CMapStringToOb problem in MFC COM DLL Pin
basementman22-Apr-04 7:58
basementman22-Apr-04 7:58 
GeneralFiles &amp; strings Pin
roadragedave22-Apr-04 5:46
roadragedave22-Apr-04 5:46 
GeneralRe: Files &amp; strings Pin
Navin22-Apr-04 6:17
Navin22-Apr-04 6:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.