Click here to Skip to main content
15,913,610 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Shutdown permittion Pin
NormDroid17-Jun-05 0:07
professionalNormDroid17-Jun-05 0:07 
GeneralRe: Shutdown permittion Pin
toxcct16-Jun-05 0:11
toxcct16-Jun-05 0:11 
GeneralRe: Shutdown permittion Pin
Bob Stanneveld16-Jun-05 0:14
Bob Stanneveld16-Jun-05 0:14 
GeneralRe: Shutdown permittion Pin
toxcct16-Jun-05 0:15
toxcct16-Jun-05 0:15 
Generalneed help again! :( Pin
c_ngo15-Jun-05 21:03
c_ngo15-Jun-05 21:03 
GeneralRe: need help again! :( Pin
NormDroid15-Jun-05 21:40
professionalNormDroid15-Jun-05 21:40 
GeneralRe: need help again! :( Pin
Nilesh K.15-Jun-05 22:04
Nilesh K.15-Jun-05 22:04 
GeneralPls Help... I'm a C++ Newbie & I'm havin these errors Pin
Psych0hans15-Jun-05 21:00
Psych0hans15-Jun-05 21:00 
This is The code. The errors Follow......
// FunctionDemo - demonstrates the use of functions by breaking
// the inner loop of the NestedDemo program off
// into its own function

#include <stdio.h>
#include <iostream.h>

// sumSequence - add a sequence of numbers entered from the
// keyboard until the user enters a negative number.
// return - the summation of numbers entered
int sumSequence(void)
{
// loop forever
int accumulator = 0;
for(;;)
{
// fetch another number
int value = 0;
cout << "Enter the next number:";
cin >> value;

// if it's negative...
if (value < 0)
{
// ...then exit from loop
break;
}

// ...otherwise add the number to the accumulator
accumulator= accumulator+ value;
}
// return the accumulated value
return accumulator;
}
int main(int arg, char* pszArgs[])
{
cout << "This program sums multiple series\n"
<< "of numbers. Terminate each sequence\n"
<< "by entering a negative number.\n"
<< "Terminate the series by entering two\n"
<< "negative numbers in a rown\";
// accumulate sequences of numbers...
int accumulatedValue;
do
{
// sum a sequence of numbersentered from the keyboard
cout << "\nThe total is "
<< "accumulatedValue
<< "\n";
// ...until the sum returned is 0
} while (accumulatedValue !=0);
cout << "Program terminating\n";
return 0;

Errors...
FunctionDemo.cpp(41) : error C2001: newline in constant
FunctionDemo.cpp(43) : error C2144: syntax error : missing ';' before type 'int'
FunctionDemo.cpp(48) : error C2001: newline in constant
FunctionDemo.cpp(54) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
Any Help Would be thoroughly appreciated... Smile | :)

"Do unto others as U would have them do to U"
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
Psych0hans15-Jun-05 21:16
Psych0hans15-Jun-05 21:16 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
toxcct16-Jun-05 0:20
toxcct16-Jun-05 0:20 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
Weiye Chen15-Jun-05 21:17
Weiye Chen15-Jun-05 21:17 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
Psych0hans15-Jun-05 21:23
Psych0hans15-Jun-05 21:23 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
PJ Arends15-Jun-05 21:31
professionalPJ Arends15-Jun-05 21:31 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
Psych0hans15-Jun-05 21:36
Psych0hans15-Jun-05 21:36 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
Weiye Chen15-Jun-05 21:53
Weiye Chen15-Jun-05 21:53 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
Bob Stanneveld15-Jun-05 22:05
Bob Stanneveld15-Jun-05 22:05 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
David Crow16-Jun-05 3:05
David Crow16-Jun-05 3:05 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
P-Rex15-Jun-05 21:55
P-Rex15-Jun-05 21:55 
GeneralRe: Pls Help... I'm a C++ Newbie &amp; I'm havin these errors Pin
Psych0hans15-Jun-05 22:04
Psych0hans15-Jun-05 22:04 
Generalsort array and map values Pin
Anonymous15-Jun-05 20:13
Anonymous15-Jun-05 20:13 
GeneralRe: sort array and map values Pin
Nilesh K.15-Jun-05 22:57
Nilesh K.15-Jun-05 22:57 
GeneralRe: sort array and map values Pin
Anonymous16-Jun-05 0:11
Anonymous16-Jun-05 0:11 
Questionhow to program to update the password policy? Pin
yyy1234515-Jun-05 19:44
yyy1234515-Jun-05 19:44 
GeneralConverting %SystemRoot% to directory Pin
RYU^^15-Jun-05 19:41
RYU^^15-Jun-05 19:41 
GeneralRe: Converting %SystemRoot% to directory Pin
RYU^^15-Jun-05 21:05
RYU^^15-Jun-05 21:05 

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.