you are outputting a address? hmm what uses addresses? Think about this if you can't figure it out look back at pointers and such.
Type: Posts; User: CSoFun
you are outputting a address? hmm what uses addresses? Think about this if you can't figure it out look back at pointers and such.
AHH I found it I am using MFC and It just so happens that there is a string that is defined when you make a new project called THIS_FILE When I couted the character array it gave me the full...
Yea this helps alot ... I wasnt sure of the syntax of just reading from a folder much less on what drive its on... I may be able to not specify and hope it reads from the same directory that the exe...
Right now I can open any text file or whatnot but it needs to be in the same folder as the exe. How do I tell the program not to look there but to look in a folder called maps? I am using MSVC++
I...
Get the code working kinda then work the smaller bugs out... maybe a recursive function or use a global int to hold your place in the file so you can read x letters in disregard them then get what...
Not from my experiance I usually just do all the input in one function and all the output in another.
But im not experianced persay most people here know much more than I. But in my opinion the...
I believe every funtion may need to have input/output declared for it as tho it doesn't pass from one to another... if you dont want brace to start at the beginning and we know it has only read one...
Ok so I found a solution.
I made a function like this
displaytext(char x)
{
cout<<x<<endl;
}
thus eliminating alot of couts in the program.... since x is always a string.
Any good sites you know of that might have some code or better yet commented code?
You got any idea how much stuff pops up on a search like that?
Is there any differance between these two statements as far as the compiler will see it?
#include <iostream.h>
#include "iostream.h"
No real time at all.... Just a turn based game... but I dont know how to use that tcp-ip stuff for c++ and it looked pretty ****ing weird when I looked at it.... I was just wondering if I could save...
For one I really dont want everyone to have my code... Ive been working on this for a while now working out small bugs and such I would rather not give every half wit with a computer my game so they...
I was wondering if it is possible to have a program save to an output file on another computer ,have that computer check the file and if some variable in it == 1 then it does its thing. Tho the...
I see the srand now... the fix is :
1) put srand(clock()); in main
2) on his srand he is using a constant a constant will ALWAYS generate the same number pattern
I didnt see a srand in there..... if he is running it threw the compiler it will usually give you the same number even if srand is used...
Joe is right on this one there is no srand(); in your code put that line in to fix your probelm.
I truely can't post it here.... that would be mean and such.... I dont have an e-mail of yours that I can attach a file to either... if you want ill go free up my yahoo e-mail.......
Ok then what do I use to output strings of data to a console ?
Display lines and lines of text? I have couts that give some storyline for the play to follow... and also some which display their weapons ... if you want a copy of the cpp I will send it to yea......
You still have the possibility to overwrite your strings with pointers.... thats the main reason I dont use them unless I really need to.... at least with declaring it with the [] you can make sure...
post code... its a 4500 line program currently and the couts are everywhere.... I don't mind sending the code out tho....
A pointer only points to it so yes they would be the same thing but you risk overwriting other variables I believe.... the pointer will give you a larger space and the declaration with th [] has a...
Actually I only have what the player needs to see In cout statements... All the rest is in txt files already =/.
/Zm will fix the probelm but when done the compiler will not accept the functions...
I have been coding a text game for some time now and I have finally reached the point that my compiler gives the
error :c:\program files\microsoft visual studio\vc98\include\ostream(285) : fatal...