How can I make the window a certain size using C. Thanks
Type: Posts; User: librab103
How can I make the window a certain size using C. Thanks
what do you mean by costly...memory wise??? and whats this "puts" also is there a way to put a space between the dashes like this: "_ _ _ _ _"
What do you mean
Yea hehe I realize that hehe... this is what I got:
void thePhrase()
{
char p[100];
char phrase[100];
int i;
printf("Please enter a word: ");
Well help out a newbie.... show me what you mean...
like this right:
char p[100];
char phrase[100];
int i;
printf("Please enter a word:");
scanf("%s", phrase);
strcpy(p, phrase);
With what you gave me chrismiceli and what XSquared told me which header to use... it gave me this error: error C2105: '++' needs l-value
What header does strcopy belong too... but yea I think i see how it works
alright... lets say I input the word "Happy" the computer prints to the screen "_ _ _ _ _" each "_" representing one letter of the word. I hope this is a little clearer
I would like to know how could I make a word or words, no matter how many characters it might have and make each character be replaced with this: "_"
I am using C and mvc++
I have this code but it seems no matter what letter I choose it goes to if and not else:
void consonant()
{
do
{
printf("Pick a letter: ");
letter=getch();
if (letter == 'a', 'e',...
Thanks... didn't think about it like that... make it work the way you want to right
How can I make it so this rand gives out numbers that are increments of 50
int wa = (rand()%700 + 300);
I already have it so the numbers are between 300-1000 just tried about everything to...
Is it the same in C++ where you need x and y coordinates. Can someone give me some examples of CursorPositions in C or point to me to a website... thanks
yea i see... alright
Hey everybody... Well, I been cleaning up my code and was looking it at and saw something and wonder how to fix it. If you ran the code and choose 1 player mode while it is the AI's turn the line...
Question of the day is... I want to make an if statement that if you press a letter besides a number it wont crash the program... Something like this:
if ( move >a || <z)
{ } //do this
else...
Yeah that is what it was... I fixed it !!! Now I am going to clean up the code and see if I can delete some lines... :D
Alright here it is:
#include <stdio.h>
#include <conio.h>
#include <windows.h>
int turn = 1, move = 0, done = 0; // Sets turn to 1, move to 0, and done to 0
char restart;
Yea I saw that..... Thanks
New problem... numbers don't want to change to 'X' or 'O' with that new code???
Thanks froggy... that is what I thought i had to do
I have been busy working and stuff... I got this done in my spare time.. Its version 1.2:
#include <stdio.h>
#include <conio.h>
#include <windows.h>
int turn = 1, move = 0, done = 0; //...
looks good. Let me see what it does:-D
I finished my ttt game, its version 1.0. I decided that once somebody has won I want to ask them if they want to play again. How would you go back into a loop once you left it? Here is my code:
...
Yea i fix the array and assign ' ' to all board spaces