I did the 2d array and i can get the stuff in,but it wont add, sub, div, or mlt right and the output comes out all wrong.
#include "stdafx.h"
#include <fstream.h>
#include <iostream.h>...
Type: Posts; User: edshaft
I did the 2d array and i can get the stuff in,but it wont add, sub, div, or mlt right and the output comes out all wrong.
#include "stdafx.h"
#include <fstream.h>
#include <iostream.h>...
I changed it around a little. Now I have a rpoblem with making the while loop work. it says ++ needs an lvalue.
#include "stdafx.h"
#include <fstream.h>
#include <iostream.h>
#include...
still doesn't like it. now it is yelling about the file.getline
The main problem is that when it gets to the code with trying to read in the file it gives me errors. It says things like infile is not part of ios.
I seem to be having trouble with the file input output what I am I doing wrong with this prorgam?
#include "stdafx.h"
#include <fstream.h>
#include <iostream.h>
#include <iomanip.h>...
Well basically it is a simply translator that adds, subtracts, divides, & Multiplies. You write it in the code like
add a,b
and its read it in and coverts it into C++ does the work and spits out...
sorry. I forgot the tags and the message it gives meis that its ends unexpectedly, but everything seems perfect, but yet it is still yelling at me.
What's wrong with this thing?
#include <iostream.h>
#include <afx.h>
void In(char var)
{
int x = 0;
while(var != letters[x] && x < 26)
ooooh thanx thats just want i needed a simple little definiton that my brain could understand
BODYSLAMMIN' 4EVER
i was wondering why stacks and queues r not traversable in data structures because the books i read dont really explain why so im kind of confused
yes i do need all of this code it has to be a data structure use Stacks and Queues as i stated
whatelse am i doinng wrong
I'm doing a data structure program where i write in a palidrome it puts it into a stack then into a queue then back to the stack and it also verifies that it is or isnt a palindrome what am i doing...
ok i tried the strncpy and some other stuff and im getting stumped i will try it w/arrays later i just want to fix what i have right now and when i enter a roman numeral i converts it to zero i sure...
I tried to do what Salem told me and i have one error that says that
D:\Microsoft Visual Studio\Work\roman\roman.cpp(9) : error C2440: 'initializing' : cannot convert from 'char' to 'char [40]'
...
i am doing a roman numeral program and i easily got it to convert from regular #s to roman numerals but im having a problem w/ making roman numerals to regular numbers could some one help me please...
This program seems like it should work but it isn't it is probably something stupid that im doing wrong,but i cant figure it out
i dont really know how to use code tags so if u can not read this u...
sorry about that boys but it is all right because i figured it out :cool:
can anyone help because i still cant get any better than the code i posted:confused:
thanx good enough my man
:cool: :cool:
here is the original code it works but it must use pointers so it is not considered correct help?
int array(int a[], int na){
for(int ia=0, ia<na;ia++){
cout<<"Enter a number: ";
...
i have to put part of the program in a function
but as u can see from what i tried it almost worked but has a few bugs i have that part as the first reply
that's all good but i need a user defined funct not one from a library
here's what i tried it sort of works but it doesnt randomly pick it always gives
a dog skipped to any car.
help?
#include "stdafx.h"
#include <cstdlib>
#include <iostream>
thanx it worked i knew it was going to be something simple but i just couldnt figure it out
anyway THANX!!:) :) :) :) :D :cool:
i have this object program and it basically works but when it returns length, area, etc it gives me a negative totally incorrect answer help??!!
for more info look at thread called Rectangle class
...