try this:
float var1 = 123.456;
int tmp = (int)var1;
int var2 = var1 - tmp;
Type: Posts; User: wyvern
try this:
float var1 = 123.456;
int tmp = (int)var1;
int var2 = var1 - tmp;
soo complicated stuff?
u could do this just like this
string map[3][3]
int main()
{
go to http://nehe.gamedev.net/
it was no use
someone else have any idea?
(and please dont give me links, gimme some code)
where can i find this file?
cuz dev-c++ dsnt have it !!!!!!!!!
[}{]ELP
SEARCHING gl/gaux.h
how do i make a program start in full screen??????????
imagine i make a program that needs to store a var in a separated file ( Auxiliar_file.txt ) and when i finish it i want the program to delet it.
all i know is to erase whats inside but how i delete...
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cctype>
using namespace std;
int main()
{
char name[255];
try this
ofstream getoutofhere ( c:\\mydir\\data );
getoutofhere << " teste";
btw:
I recently made a game wich is like pacman but in ASCII no graphics and made in console.
everytime a movement happens i use system("cls") to delete all and rewrite the map with the new pacman...
UPS sorry caps was on and i was in a rush sorry
=( :(
CAN ANYONE TELL ME HOW I ADD COLOR IN A PROGRAM???
LIKE THIS =D
I finnaly found a safe way to do it here it is
int x;
x = getch();
??? what? ???
what i meaned is like:
[code/]
string x;
x = getch;
how i use arrows in a program?
like -> to move right , <-- to move left etc...
THANK U
the confusy part is not clear as water.
<3.E>
i came across with this few var declaration words i dont know what they do please explain me plz:
- Unsigned ( ex: unsigned int variable)
- Const ( ex: Const char variable )
- long ( ex:...
Dear Moderator.
First of all i would like to say that i recognise that what ILoveVectors did was wrong but WHAT u did to him ( u know what u did dont pretend u dont) is not correct too.
Why am...
this code return this error :
12 E:\WKC\Untitled1.cpp [Warning] converting to `int' from `double' .
(if it is my mistake please teach me, im new to c++)
tankx u.
ur 1st example was what i was asking but the second will certainly help me too.
again TTTTTTTYYYYYYYY a lot.
i still dont understand this here:
""With that method, however, print() can't modify the variables (well, it can, but call() won't notice the changes). If you want the values to change:
Code:...
thankx u for the info really thank you and ... i dont read c++ books yet.
for now my guide are the toturials in here
then make 21 +1 not (20+1)+1
im am new to c++ (im learning it for about 3weeks) but i made a game and i wanted feedbak, newways i can improve it, and teach me using local variables.
#include <cstdlib>
#include <fstream>...
please explain better