|
TaskMgr.exe for Windows
ps -ef for Unix
Blogless
|
|
|
|
|
Try this[^]
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
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...
"Do unto others as U would have them do to U"
|
|
|
|
|
Hey Guys Cmon...... Help the Newbie here.....
|
|
|
|
|
hey, why don't you just wait ?
if only you had waited for at least 1 whole hour, but a 1/4h...
you really want us not to answer ???
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Psych0hans wrote:
<< "accumulatedValue
Missing " at the end.
Also, missing closing bracers at end of main function.
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
Thanks a Bunch!!!!
Bit I'm still havin 2 errors
Cpp(41) : error C2001: newline in constant
FunctionDemo.cpp(43) : error C2144: syntax error : missing ';' before type 'int'
Error executing cl.exe.
Do Unto Others As U Would Have Them do to U
|
|
|
|
|
Read line 41 in your code. Notice how you screwed up the new line at the end?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Thanks Pj I got that one fixed...... :-P
LOL Ders Jus 1 warning now.......
cpp(51) : warning C4700: local variable 'accumulatedValue' used without having been initialized
I'm Copyin the code from a book called C++ For Dummies.
(:-P Perfect for ppl like me )
Do Unot Others As U Would Have Done TO U
|
|
|
|
|
Psych0hans wrote:
warning C4700: local variable 'accumulatedValue' used without having been initialized
You didn't initialise it. Should do something like this:
int iValue = 0;
<font=arial>Weiye Chen
Life is hard, yet we are made of flesh...
|
|
|
|
|
Psych0hans wrote:
I'm Copyin the code from a book called C++ For Dummies.
(:-P Perfect for ppl like me :doh
Try using:
while( VS::Compiler::HasOutput() )
VS::Compiler >> Brain;
Sorry if I insult you, but it seems that you just do something without using your head. You just post your code and the compiler errors and wait for a solution. This is not a good habit of a starting programmer!
Please, for your own sake, try to fix the errors first by yourself, instead of posting compiler output and waiting for results.. You are not a manager!
One last thing, try and use normal english instead of sms / IM language, which is not very readable...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
One last thing, try and use normal english instead of sms / IM language, which is not very readable...
Agreed. I hate trying to read that crap. Some posts I do not even respond to for that reason alone. The amount of help a person gets from me is inversely proportional to how much effort, including reading the post, I have to exert.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
find this line in your code
int accumulatedValue; and change it
int accumulatedValue = 0;
the warning should be gone
|
|
|
|
|
Thanks a Lot Dude... That Solved My Problem 100%
U're
|
|
|
|
|
hi
I am having three arrays where 1. EntryId array 2.Subject array and 3. Time array. the elements of the array maps to the corresponding elemnts of the other two arrays.
I mean fr eg.
if entry ID is 2 it should be mapped with subject array of 2nd element and time array of 2nd element.
I want to sort it time was.
cheers
jhon
|
|
|
|
|
Maps would be better option here.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
|
how to program to update the password policy of the local security policy?
for example: to set the length of the user password not less 6 .
|
|
|
|
|
How to convert %SystemRoot% to a directory (such as, C:\Windows or C:\WinNT)
Thanks again for any help
|
|
|
|
|
I found the answer, please use this function: ExpandEnvironmentStrings.
Cheers
|
|
|
|
|
i have the idea how to connect with ODBC . But when i move to the record pointer it is pointing to a single record . it cannot mone prev and next . what will be my mistake
|
|
|
|
|
Anonymous wrote:
what will be my mistake
My crystal ball is broken. Without a code snippet showing exactly what you are doing, it's hard to say.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hello!
I've been trying to use CHtmlView class in my project.
Everything was OK.
The only problem is that I can't use ctrl+c, ctrl+v, delete,.... in the HTML view object.
I searched all the internet site, but no solution.
I tried some samples in this site, which using CHtmlView or IWebBrowser.
The result is same, shortcut keys are nowhere.
The only exception is the sample which I got from MSDN sample(mfcie).
Thanks.
|
|
|
|
|
|
Thanks for your help!
I learned many things about ActiveX controls with these days work and your advice.
I made my program work with accelarator keys in web-browser control.
The only problem is that ctrl-c, ctrl-x don't work until now.
Tab, ctrl-v, delete keys work.
Maybe it's my homework.
Thanks again.
|
|
|
|