I am using Borland C++ 5.02 and my operating system is Windows 2000.
Im having trouble compiling the following code:-
#include <iostream>
using namespace std;
int main()
{
cout <<...
Type: Posts; User: Hypercase
I am using Borland C++ 5.02 and my operating system is Windows 2000.
Im having trouble compiling the following code:-
#include <iostream>
using namespace std;
int main()
{
cout <<...
getfile keeps reading the same line. I tried it in a loop and it still reads only the first line. Could u plz give me a small example.
I have created an input stream to read from a text file. I am able to read the first line using Infile.get(array,characters,'\n');
How do i read the second line? How do i get the program to read the...
hi,
how do i go about making a program that searches for a particular file.
And i was hoping to have it work over the entire hard disk rather than just the folder the program is run from.
I'm...
I,ve been trying to write a program that calculates the factorial of a number.
The program works quite well, but for the fact that i'm unable to store the value of the factorial.
80! has over a...
How do i delete a variable.
If I have a variable declared:
<data type> <variable name>;
and if my prog is long and i have used the variable and dont require it any longer.
If it was Windows XP and Borland C++ 5.02, how would it be done.
The alternatives suggested by jlou dont seem to work.
I'm still using Seekg(0), and clear(), however i write the input as cin>>dec>>i;
This seems to have ended the problem.
But could you plz...
I'm having problems validating my input values.
To ensure only numeric input i did:
while(cin.good())
{
cout<<"Please enter a number: ";
cin>>i;
cout<<cout<<i;
}
Why would you want to do that? :confused:
Anyway hope this helps:-
#include <iostream>
int main()
{
int int_char;
char C;
I have written a prog in C/C++, no OOPs concepts.
How do I find how much processing power, and memmory my program uses while it runs?
I'm using a Borland C++ 5.02 compiler.
-Cheers
I dont think its really efficient to call a func to run just on line of code.
You display of the answer could be included in the calculation function.
Thanx Vicious, that was very helpful.
Thanx for the program, i hav another one working too. Its just that I wanted to know what was wrong with the code I posted above.
Also by doing "testvalue >> loop " I'm changing the testvalue which...
mask = 0x80;
for(i = 0; i < 8; i++)
{
if((testvalue & mask)!= 0)
{
cout<<"1";
}
else
{
cout<<"0";
Thanx.
Is there any way i can get the system to store an integer in 3 bytes.
And how do i do consecutive reads on a two dimensional array.
eg:- If i had an array[8][9] how can i read it 6 values...
Thanx for the help.
But how do i manipulate individual bits, is there an prog that can be created to change the individual bits,could i target a particular bit in the 4 bytes for an integer and...
I was working on a project, and how do i use individual bits,
i thought of using bools, but they take up a byte.
Is there i can declare and manipulate individual bits.
An int is stored in 4 bytes,...
Hi,
I'm programming in C(basic stuff mostly).
I've got a selection sort and a bubble sort going.
But what's an insertion sort and binary sort ? :( could you please explain these sorting...