473,218 Members | 1,402 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,218 software developers and data experts.

I'm not understanding something

This is the problem that I have to solve :

Write a program to convert a temperature input in Celsius or Fahrenheit
to the other scale. Provide an appropriate prompt, and accept the
temperature input as a double, followed by a char representing the
scale (C or F). Perform the appropriate conversion and display the
original input and result. Write functions ftoc and ctof to do the
conversion and return the result to be displayed in main. The
conversion formulas are as follows, where C is a temperature in degrees
Celsius, and F the equivalent in Fahrenheit:

C = (5.0 / 9.0) * (F - 32)
F = ( (9.0 / 5.0) * C ) + 32

So basically if you enter a temp in Fahrenheit I need to convet it to
Celsius and vice versa.
The user input should be in the form of a double then the scale. For
example
32 F which stands for 32 degrees Fahrenheit. Here is my code so far.
Which compiles but will not execute
#include <stdio.h>
#include <stdlib.h>

double farTemp(double);
double centTemp(double);

int main()
{
double userTemp;
char scale;
char F,f,C,c;
printf("Enter Temp & Scale (F Or C ) ");
scanf("%lf%lf", &userTemp,&scale);

if(scale==f || scale== F)
centTemp(userTemp);

printf("%f", userTemp);

system("PAUSE");
return 0;
}

double CentTemp(double a)

{

return (5.0/9.0)*a -32 ;
}

Feb 23 '06 #1
23 1979
Several errors in your code. Read comments below.

RadiationX wrote:
This is the problem that I have to solve :

Write a program to convert a temperature input in Celsius or Fahrenheit
to the other scale. Provide an appropriate prompt, and accept the
temperature input as a double, followed by a char representing the
scale (C or F). Perform the appropriate conversion and display the
original input and result. Write functions ftoc and ctof to do the
conversion and return the result to be displayed in main. The
conversion formulas are as follows, where C is a temperature in degrees
Celsius, and F the equivalent in Fahrenheit:

C = (5.0 / 9.0) * (F - 32)
F = ( (9.0 / 5.0) * C ) + 32

So basically if you enter a temp in Fahrenheit I need to convet it to
Celsius and vice versa.
The user input should be in the form of a double then the scale. For
example
32 F which stands for 32 degrees Fahrenheit. Here is my code so far.
Which compiles but will not execute
#include <stdio.h>
#include <stdlib.h> double farTemp(double);
double centTemp(double);
Your specification clearly states that those functions should be called
ftoc and ctof. BTW the names your specification provides are much more
explicit than your choice. In case you didn't notice, ftoc stands for
"fahrenheit to celsius" and ctof for "celsius to fahrenheit". farTemp
gives the idea that it returns a fahrenheit value, but it doesn't give
a clue about what the argument may mean. Learn to name your functions
and variables in a explicit way. Choosing obfuscated identifiers to
save a few keystrokes can make debugging your code later twice as
difficult.
int main()
{
double userTemp;
char scale;
char F,f,C,c;
Here you have declared a double that will hold the temperature provided
by the user, another one that will hold the scale specified by the
user... and four variables with no clear porpouse. It's a good idea to
add comments when declaring functions and variables explaining the
intended use for the varible or the logic/computation/algorithm
implemented by the function.

On a side note, you have not declared a variable for holding your
computation. You could make without one, but I would add the following
line:

double computedTemp;
printf("Enter Temp & Scale (F Or C ) ");
Notice that if you don't send a '\n' to the output there's no guarantee
that the text you sent will appear on the screen. So it may happen that
when the program executes the user is presented with a blank screen
while the program is awaiting for the user to input data. Modify the
above line as follows:

printf("Enter Temp & Scale (F Or C )\n");

scanf("%lf%lf", &userTemp,&scale);
scanf is dangerous and should be avoided at all costs, but since this
is clearly a toy program we'll stick with it. Be warned however that
the fgets/sscanf combo is much safer.

The above line invokes undefined behaviour. You have specified in the
format string that you want to read 2 doubles, but you provide a
pointer to a float and a pointer to char. Your specification states
that you should read a char, so the obvious fix to this is changing the
format string to actually tell scanf that you want to read a char:

scanf("%lf %c", &userTemp, &scale);

Finally, you should be aware that scanf may fail parsing its arguments.
Imagine what will happen if the user inputs something like: "I can't
think of one temperature right now!"
scanf returns the number of arguments that where succesfully parsed and
assigned. Check that it's 2. In a toy program like this one, your best
option would be to exit with an error message. In real software you'll
have to consume the line from stdin (scanf will leave things in it) and
prompt the user again for correct data.

Furthermore, you should make sure that the data provided by the user
makes sense. How is your program to behave if the user prompts 'R' as
the temperature scale?
if(scale==f || scale== F)
Here you are comparing the value of the variable scale with the value
of the variable f, and with the value of the variable F. Note that
neither f nor F have been initialized to a known value. Accessing an
unitiliazed variable invokes undefined behaviour.

I suspect that the check you really wanted to make is: (scale == 'f' ||
scale == 'F')
centTemp(userTemp);
This line computes the celsius temperature and then thows it away. You
really want to store it somewhere.

I see no check for the selected scale beeing celsius, and no call to
the ctof function.
printf("%f", userTemp);
This will print the value entered by the user. You don't want that.
Specifying the temperature scale in the output might be a good idea
too.

system("PAUSE");
Implementation specific, and mostly unneeded if you use your program
from a CLI.
return 0;
}

double CentTemp(double a)

{

return (5.0/9.0)*a -32 ;
Some spacing here would make this expression more readable. }


You should write a function to perform the inverse computation.

HTH

Feb 23 '06 #2
WoW, you really pointed out a lot of errors to me. Thank you. I'm going
to work on correcting them and then I'll post my updated code.

Feb 23 '06 #3
RadiationX wrote:
This is the problem that I have to solve :
[snip: conversion from Fahrenheit to Celsius]
Here is my code so far.
Which compiles but will not execute
It didn't compile for me (*).
I'm a newbie C programmer, but (I hope) nothing is wrong with my
(very short) comments.

#include <stdio.h>
#include <stdlib.h>

double farTemp(double);
double centTemp(double);
Later, in main() you call centTemp -- but you never define it; you
define another function called `CentTemp'.

[some blank lines removed from the code]
int main()
{
double userTemp;
char scale;
char F,f,C,c;

printf("Enter Temp & Scale (F Or C ) ");
printf() should have a terminating '\n'
scanf("%lf%lf", &userTemp,&scale);
Read two doubles into a double and a char?
My compiler issued a warning at this line.

Also scanf() is a bad choice to get user input.
if(scale==f || scale== F)
Compare scale to two uninitialized variables?
.... I think you mean something else.
centTemp(userTemp);
Call the (inexistent) centTemp function and discard the results.
printf("%f", userTemp);

system("PAUSE");
return 0;
}

double CentTemp(double a)
{
return (5.0/9.0)*a -32 ;
This calculation does not calculate the same thing as the calculation
specified in your intro to this article.
}


(*) "It didn't compile for me" -- that was a lie.
Actually it compiled but didn't link.

--
If you're posting through Google read <http://cfaj.freeshell.org/google>
Feb 23 '06 #4
Here is my updated code, which will compile now but it wont let me
enter a scale.
I know the code is incomplete I'm just trying to get it to work with
the celcius to fahrenheit
scale then i'll go back in and put in the fahrenheit to celcius. What's
wrong with waht I have now?

Feb 23 '06 #5
Here is my updated code, which will compile now but it wont let me
enter a scale.
I know the code is incomplete I'm just trying to get it to work with
the celcius to fahrenheit
scale then i'll go back in and put in the fahrenheit to celcius. What's
wrong with waht I have now?
#include <stdio.h>
#include <stdlib.h>

double ftoc(double);
double ctof(double);

int main()
{
double userTemp; // user inputed temp
char scale; // what scale the temp is in
char F,f,C,c; // storage of the char for the different temps
double finalOutput; // output of the conversion

printf("Enter Temp & Scale (F Or C ) \n");
scanf("%lf%c", &userTemp,&scale);

if(scale == 'f' || scale == 'F')
{
finalOutput = ftoc(userTemp);
printf(" %d ", finalOutput);
}


system("PAUSE");
return 0;
}

double ftoc(double a)

{

return (5.0/9.0)*a -32 ;
}
double ctof(double b)

{
return ( (9.0 / 5.0) * b) + 32;
}

Feb 23 '06 #6
RadiationX wrote:
Here is my updated code, which will compile now but it wont let me
enter a scale.
Glad I could help you with my previous post. See some comments below.
I know the code is incomplete I'm just trying to get it to work with
the celcius to fahrenheit
scale then i'll go back in and put in the fahrenheit to celcius. What's
wrong with waht I have now?
#include <stdio.h>
#include <stdlib.h>

double ftoc(double);
double ctof(double);

int main()
{
double userTemp; // user inputed temp
char scale; // what scale the temp is in
char F,f,C,c; // storage of the char for the different temps
You don't use these variables. There's no need to declared them.

On a side note, // style comments are not a good idea when posting code
to usenet as they don't survive line wrapping. The /* */ style is
prefered.
double finalOutput; // output of the conversion

printf("Enter Temp & Scale (F Or C ) \n");
scanf("%lf%c", &userTemp,&scale);
You still don't check the return value of scanf. Did it parse both
fields and assign a value to both variables. Check it, print it out and
you'll get some idea of what's going on. Trying to debug code
blindfolded is not a good idea.

If scanf parsed the two fields, print the values of userTemp and scale.
That might give you some hints.
if(scale == 'f' || scale == 'F')
{
finalOutput = ftoc(userTemp);
printf(" %d ", finalOutput);
finalOutput is a double, buth since you provided a %d specifier, printf
expects an integer. You have undefined behaviour right there. Check you
documentation for the proper format specifier for printing doubles.
Hint: it is very similar to the format you used for parsing a double
with scanf.
}
<snipped some blank lines>

system("PAUSE");
return 0;
}

double ftoc(double a)

{

return (5.0/9.0)*a -32 ;
}
As Pedro Graca pointed and I failed to notice in my previous post, this
is not the computation that your assignment asked for. Rewrite it.

What I said in my other post about variable and function names is also
true for parameters. Their name should be descriptive. a doesn't give
any idea of what it is suppossed to be. IMO it would be much better if
you declared the function like:

double ftoc (double fahrenheit)

OR

double ftoc (double fahr)

if you really want to save those key-strokes.


double ctof(double b)

{
return ( (9.0 / 5.0) * b) + 32;
}


Feb 23 '06 #7
I Think I have it now. This is working for me. I really appreciate all
the help
#include <stdio.h>
#include <stdlib.h>

double ftoc(double);
double ctof(double);

int main()
{
double userTemp= 0; // user inputed temp
char scale; // what scale the temp is in
char F,f,C,c; // storage of the char for the different temps
double finalOutput; // output of the conversion

printf("Enter Temp & Scale (F Or C ) \n");
scanf("%lf %c", &userTemp,&scale);

if(scale == 'f' || scale == 'F')
{
finalOutput = ftoc(userTemp);
printf(" %lf \n", finalOutput);
}

else
{if(scale=='C' || scale=='c')
finalOutput= ctof(userTemp);
printf("%lf\n", finalOutput);
}



system("PAUSE");
return 0;
}

double ftoc(double a)

{

return (5.0/9.0)*a -32 ;
}
double ctof(double b)

{
return ( (9.0 / 5.0) * b) + 32;
}

Feb 23 '06 #8
RadiationX wrote:

I Think I have it now. double ftoc(double a)

{

return (5.0/9.0)*a -32 ;
}


(5.0 / 9.0) * (a - 32)

--
pete
Feb 24 '06 #9
Pedro Graca <he****@dodgeit.com> writes:
RadiationX wrote:

[...]
printf("Enter Temp & Scale (F Or C ) ");


printf() should have a terminating '\n'


It's reasonable not to have a terminating '\n' on an interactive
prompt, but you need to call fflush(stdout) to make sure the prompt
actually appears.

You do need a trailing '\n' on your program's final output; it's
implementation-defined whether the last line of a text stream (such as
stdout) requires a new-line.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 24 '06 #10
Now i'm having problems again. The program is working but it keeps
outputting the same values over and over again.

#include <stdio.h>
#include <stdlib.h>

double ftoc(double);
double ctof(double);

int main()
{
double userTemp; // user inputted temp
char scale; // what scale the temp is in
char F,f,C,c; // storage of the char for the different temps
double finalOutput; // conversion output

printf("Enter Temp & Scale (F Or C ): ");
scanf("%f %c", &userTemp,&scale);

if(scale == 'f' || scale == 'F')
{
finalOutput = ftoc(userTemp);
printf("%lfF = %lfC \n",userTemp,finalOutput);
}

else
{
if(scale=='C' || scale=='c')
{
finalOutput= ctof(userTemp);
printf("%.1lfC = %.1lfF \n",userTemp,finalOutput);
}

}
system("PAUSE");
return 0;
}

double ftoc(double a)

{

return (5.0 / 9.0) *a - 32;
}
double ctof(double b)

{
return ( (9.0 / 5.0) * b) + 32;
}

Feb 24 '06 #11

"RadiationX" wrote:
Now i'm having problems again. The program is working but it keeps
outputting the same values over and over again.

#include <stdio.h>
#include <stdlib.h>

double ftoc(double);
double ctof(double);

int main()
{
double userTemp; // user inputted temp
char scale; // what scale the temp is in
char F,f,C,c; // storage of the char for the different temps
The four variables are never used and can be omitted.
double finalOutput; // conversion output

printf("Enter Temp & Scale (F Or C ): ");
scanf("%f %c", &userTemp,&scale);


Just a guess: should be %lf and not f, since userTemp is double...

scanf("%lf %c", &userTemp,&scale);
<SNIP>

regards
John
Feb 24 '06 #12
RadiationX wrote:
I Think I have it now. This is working for me. I really appreciate all
the help
#include <stdio.h>
#include <stdlib.h>

double ftoc(double);
double ctof(double);

int main()
{
double userTemp= 0; // user inputed temp
char scale; // what scale the temp is in
char F,f,C,c; // storage of the char for the different temps
These variables are not used. They don't serve any porpouse. Remove
them.
double finalOutput; // output of the conversion

printf("Enter Temp & Scale (F Or C ) \n");
scanf("%lf %c", &userTemp,&scale);

if(scale == 'f' || scale == 'F')
{
finalOutput = ftoc(userTemp);
printf(" %lf \n", finalOutput);
The correct format specifier for printing doubles is %f, not %lf. In
fact if you read your manual pages you'll see that the l length
modifier cannot be applied to the f conversion specifier.
}

else
{if(scale=='C' || scale=='c')
finalOutput= ctof(userTemp);
printf("%lf\n", finalOutput);
}
The logic of this case is faulty. Imagine that the user enters 'H' as
the temperature scale. The condition in the first if is not met so you
fall to this else. Now the condition of this if is not met so you don't
execute the call to ctof and don't assign to finalOutput. But in the
next line (which is outside the if statement) you use the value of the
yet unassigned finalOutput. This invokes undefined behaviour, and while
the most usual behaviour would be to print some random value, it is
also possible for other things to happen. In fact everything may happen
as far as the language is concerned.

I suspect that what you really want is:

else if (scale == 'C' || scale == 'c') {
finalOutput = ctof(userTemp);
printf("%f F\n", finalOutput);
}

On a side note, with my modification if the user enters a scale
temperature that doesn't match any of the conditions the program will
exit without warning the use why it is not doing anything. This is
rude. You should print some kind of message indicating that the data
entered was not correct and that your aborting execution.

<snip blanks>

I can't stop myself from wondering why you use so little horizontal
spacing while using lots of unnecessary vertical space...
system("PAUSE");
return 0;
}

double ftoc(double a)

{

return (5.0/9.0)*a -32 ;
}
As has been pointed to you at least three times by now the above
expression is not correct. Multiplication has a higher precedence than
substraction so the above expression parses as:

(5.0 / 9.0 * a) - 32

which is not what you want.


double ctof(double b)

{
return ( (9.0 / 5.0) * b) + 32;
}


Lots of unnecessary parentheses.

Feb 24 '06 #13
On 23 Feb 2006 13:42:59 -0800, "RadiationX" <he*********@gmail.com>
wrote:
This is the problem that I have to solve :

Write a program to convert a temperature input in Celsius or Fahrenheit
to the other scale. Provide an appropriate prompt, and accept the
temperature input as a double, followed by a char representing the
scale (C or F). Perform the appropriate conversion and display the
original input and result. Write functions ftoc and ctof to do the
conversion and return the result to be displayed in main. The
conversion formulas are as follows, where C is a temperature in degrees
Celsius, and F the equivalent in Fahrenheit:

C = (5.0 / 9.0) * (F - 32)
F = ( (9.0 / 5.0) * C ) + 32

So basically if you enter a temp in Fahrenheit I need to convet it to
Celsius and vice versa.
The user input should be in the form of a double then the scale. For
example
32 F which stands for 32 degrees Fahrenheit. Here is my code so far.
Which compiles but will not execute
#include <stdio.h>
#include <stdlib.h>

double farTemp(double);
double centTemp(double);

int main()
{
double userTemp;
char scale;
char F,f,C,c;
printf("Enter Temp & Scale (F Or C ) ");
scanf("%lf%lf", &userTemp,&scale);
The second %lf says the input value will be a double. The
corresponding argument must be a double*. You passed a char*. This
invokes undefined behavior. I think you meant %c.

if(scale==f || scale== F)
centTemp(userTemp)
centTemp returns a value. What do you do with that value?

printf("%f", userTemp);

system("PAUSE");
return 0;
}

double CentTemp(double a)

{

return (5.0/9.0)*a -32 ;
}

Remove del for email
Feb 24 '06 #14
"Antonio Contreras" <an*****@gmail.com> writes:
RadiationX wrote:
printf(" %lf \n", finalOutput);


The correct format specifier for printing doubles is %f, not %lf. In
fact if you read your manual pages you'll see that the l length
modifier cannot be applied to the f conversion specifier.


I'd still recommend using it, just to get into the habit. It's
incorrect to say that it cannot be applied: it's just that it has no effect.
Feb 24 '06 #15
Micah Cowan schrieb:
"Antonio Contreras" <an*****@gmail.com> writes:
RadiationX wrote:
printf(" %lf \n", finalOutput);


The correct format specifier for printing doubles is %f, not %lf. In
fact if you read your manual pages you'll see that the l length
modifier cannot be applied to the f conversion specifier.


I'd still recommend using it, just to get into the habit. It's
incorrect to say that it cannot be applied: it's just that it has no effect.


Depends on your implementation; in C89, l preceding anything
but d, i, o, u, x, X, or n invokes undefined behaviour, at
least by the last public draft.

Getting thousands of "not supported" warnings which could not
be turned of when "porting" a "portable" program to a platform
with another compiler family has certainly soured this "valuable
habit" for me.
Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Feb 24 '06 #16
Micah Cowan wrote:

"Antonio Contreras" <an*****@gmail.com> writes:
RadiationX wrote:
printf(" %lf \n", finalOutput);


The correct format specifier for printing doubles is %f, not %lf. In
fact if you read your manual pages you'll see that the l length
modifier cannot be applied to the f conversion specifier.


I'd still recommend using it, just to get into the habit.


What's the advantage of getting into the habit of writing %lf,
when %f is the right format specifier for double?

--
pete
Feb 24 '06 #17
Micah Cowan <mi***@cowan.name> writes:
"Antonio Contreras" <an*****@gmail.com> writes:
RadiationX wrote:
> printf(" %lf \n", finalOutput);


The correct format specifier for printing doubles is %f, not %lf. In
fact if you read your manual pages you'll see that the l length
modifier cannot be applied to the f conversion specifier.


I'd still recommend using it, just to get into the habit. It's
incorrect to say that it cannot be applied: it's just that it has no
effect.


You're right, the 'l' in "%lf" has no effect -- but why do you
recommend using it? "%f" is the usual format for printing an argument
of type double.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 24 '06 #18
On 2006-02-24, Micah Cowan <mi***@cowan.name> wrote:
"Antonio Contreras" <an*****@gmail.com> writes:
RadiationX wrote:
> printf(" %lf \n", finalOutput);


The correct format specifier for printing doubles is %f, not %lf. In
fact if you read your manual pages you'll see that the l length
modifier cannot be applied to the f conversion specifier.


I'd still recommend using it, just to get into the habit. It's
incorrect to say that it cannot be applied: it's just that it has no effect.


It produces undefined behavior. For example, it would be reasonable for
a pure c89 printf implementation to use the same internal flag for l and
L.
Feb 24 '06 #19
pete <pf*****@mindspring.com> writes:
Micah Cowan wrote:

"Antonio Contreras" <an*****@gmail.com> writes:
RadiationX wrote:
> printf(" %lf \n", finalOutput);

The correct format specifier for printing doubles is %f, not %lf. In
fact if you read your manual pages you'll see that the l length
modifier cannot be applied to the f conversion specifier.


I'd still recommend using it, just to get into the habit.


What's the advantage of getting into the habit of writing %lf,
when %f is the right format specifier for double?


Because %lf has the right meaning for scanf(), and the right intuitive
meaning in general.

But I wrote this before I realized that its inclusion before f was a
new feature to C99.
Feb 24 '06 #20
Jordan Abel <ra*******@gmail.com> writes:
On 2006-02-24, Micah Cowan <mi***@cowan.name> wrote:
"Antonio Contreras" <an*****@gmail.com> writes:
RadiationX wrote:
> printf(" %lf \n", finalOutput);

The correct format specifier for printing doubles is %f, not %lf. In
fact if you read your manual pages you'll see that the l length
modifier cannot be applied to the f conversion specifier.


I'd still recommend using it, just to get into the habit. It's
incorrect to say that it cannot be applied: it's just that it has no effect.


It produces undefined behavior. For example, it would be reasonable for
a pure c89 printf implementation to use the same internal flag for l and
L.


C90 specifically says that "%lf" invokes undefined behavior.

C99 says that the 'l' in "%lf" has no effect.

IMHO this is similar to the C99 rule that falling off the end of
main() is equivalent to executing "return 0;"; it causes some
previously undefined code to become defined, but is not helpful for
code that was correct in the first place.

There is no good reason to use "%lf" rather than "%f".

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Feb 24 '06 #21
Keith Thompson wrote:
C99 says that the 'l' in "%lf" has no effect.

IMHO this is similar to the C99 rule that falling off the end of
main() is equivalent to executing "return 0;"; it causes some
previously undefined code to become defined, but is not helpful for
code that was correct in the first place.


Those were my two counter examples to Doug Gwyn's claim
that the standard doesn't cater to sloppy programmers.

--
pete
Feb 24 '06 #22

"RadiationX" <he*********@gmail.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
This is the problem that I have to solve :
<snip> The
conversion formulas are as follows, where C is a temperature in degrees
Celsius, and F the equivalent in Fahrenheit:

C = (5.0 / 9.0) * (F - 32)
F = ( (9.0 / 5.0) * C ) + 32


Using more symmetric equations might improve your coding:

C=((5/9)(F+40))-40
F=((9/5)(C+40))-40
Rod Pemberton
Feb 24 '06 #23
Thanks everyone who helped me out. I finally found my bugs and fixed
them.
I'm a very very novice programmer and some of the things that were
suggested to me I have not had any exposure to them so I could not
implement them.

Feb 26 '06 #24

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kapil Khosla | last post by:
Hi, I have been trying to understand this concept for quite sometime now somehow I am missing some vital point. I am new to Object Oriented Programming so maybe thats the reason. I want to...
8
by: Gerald Aichholzer | last post by:
Hello NG, I try to apply the following template <xsl:template match="objectgroup"> <xsl:copy> <xsl:apply-templates select="*|@*"/> <xsl:variable name="object" select="."/> <xsl:for-each...
26
by: Bail | last post by:
I will have a exam on the oncoming friday, my professor told us that it will base upon this program. i am having troubles understanding this program, for example what if i want to add all the...
82
by: Eric Lindsay | last post by:
I have been trying to get a better understanding of simple HTML, but I am finding conflicting information is very common. Not only that, even in what seemed elementary and without any possibility...
18
by: Simon | last post by:
Hi, I understand what one the differences between std::vector, std::deque and std::list is, the std::vector can have data inserted/deleted at the end. The std::deque can have data...
7
by: Buck Rogers | last post by:
Hi all! Newbie here. Below is an example from Teach Yourself C in 21 Days. My apologies if it is a bit long. What I don't understand is how the "get_data" function can call the...
1
by: Anonieko | last post by:
Understanding and Using Exceptions (this is a really long post...only read it if you (a) don't know what try/catch is OR (b) actually write catch(Exception ex) or catch{ }) The first thing I...
10
by: sasquatch | last post by:
X-No-Archive: Are there any good books that provide tips about how to understand and "play with" large C++ programs? It seems like a very important skill, and yet its hardly taught in the...
4
by: Andrew Taylor | last post by:
Hi, I've been using PHP for a long time, I have designed and developed a number of mid-range systems. I've always used a procedural approach. I fully understand the concept of OO, I know all the...
5
by: mosscliffe | last post by:
I have the following code, which I thought would create a cookie, if one did not exist and on the html form being sent to the server, it would be availabe for interrogation, when the script is run...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.