:eek: thanks omni, guess i got confused.
Type: Posts; User: kiss_psycho
:eek: thanks omni, guess i got confused.
but omnius, & should produce an address. strange, isnt there any explainable reason behind this?
oh no josh, &c gives an address which can only be stored in a character type pointer. the syntax i wrote is absolutely correct, there must be some problem with the character representation in C++...
i got this problem with turbo C++ v.3.0 that i cannot create an exe from a 'obj' created by tcc with the -c option. tlink simply does not seem to work. and the library file names are not specific....
this may sound strange, but each time i try to print the address of a character, it prints out the character.
for example,
char c='a',*p;
p=&c;
cout<<p;
I am using Turbo C++ version 3.0 and i never compiled using the command line. now, i have got a problem. i have to compile the source .cpp file to a .obj file using tcc.exe (i got that -- its using...
could yo rephrase that ??
strange -- no arrays, no * rs, no cstrings too???
check if you can use CString objects in your code if you use MSVC++, you can try something like this.
CString str1,str2;
cin>>str1;...
yes, u can post the code -- i'll try.
could you explain a bit clearly. :)
try using cout.precision(precision_value);
eg:
cout<<setiosflags(ios::fixed);
cout.precision(2);
cout<<123.4567;
O/P is 123.46
for rounding off floating point nos. and...
use strcpy or CString objects to avoid pointers. and could you please rephrase your roundoff problem?
if you really want to do something radical, try doing it in Turbo C++ instead. i guran-dam-tee you that it'll keep you busy for a long long time ;) . and i'd like the screen shot.
if you are wanting to rethrow, make sure you catch the exception in an enclosing block. for this, better terminate the program execution at the said point instead of rethrowing to terminate.
this might sound strange and unconventional i guess, but could you try reading into seperate variables and then assigning the structure elements -- this is a strange problem with turbo C++. this...
Problem statement :
"In 2-D co-ordinate system, to determine whether a given trial point is inside or outside a given polygon -- the polygon may be concave or convex"
Input :
1. The no. of...
textcolor takes effect after clearing the screen.
pick up a good ol book and study. hell, they'll also be teaching you from stuffs like books, wont they.
hell, long time since i was away.
i got a solution -- one of my erly days -- it aint classical, of course, but it works nonetheless, with perhaps a few glitches in the computer play section. see...
This is a problem i am having when i am trying to obtain the address of a character type variable and print the address using cout. the printing works fine when i am using generic pointers by...
use code tags while posting code, man. neway glad it worked.
Ok, then i am not supposed to use getch();. But is there any analogous ANSI version that waits for a character input and assigns that character to a variable without waiting for the return key to be...
This is what u want..
and yes, cin.get() does not work as getch() does.
#include<iostream.h>
int main()
{
int i,j;
The variable, c in the calling module is referenced as variable,a in the called module, and if a changes in the called module, c will change.
The namespace keyword allows you to partition the global namespace consisting of huge numbers of variable names, class names and function names into declarative regions, thus allowing a name used in...