Thank you for your help. I finished it. And i have to say it works.
Now its time to do the second assigment --> calculator. I already know i will need some help... :)
Type: Posts; User: bnkslo
Thank you for your help. I finished it. And i have to say it works.
Now its time to do the second assigment --> calculator. I already know i will need some help... :)
Yes this is all i want to do. At the end i have to keep track of the hands that where dealt.
Like:
1 x pair
4 x 2 pair
1 x tree of a kind
...
..
.
Thank you for your help... I implemented what you said.
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
Hello. My problem is like this. I have to make a program where i have 6 random number from 1 to 6. I can change any of the numbers 2 times. So far this is working for me. The next step i dont know...
what about:
buffer=malloc(sizeof(vData));
But the thing is i dont know how to malloc the memory?
Could i do something like this:
FILE *vData, *iData;
char *buffer[MAX_SIZE];
I agree if there is:
<step 1>
But what if there is only:
<step 1
and after that there is no >. I would search true the whole file for the > and i would not find it, so i would need to...
I would say i need so much memory as the file is big? But i could be wrong!?
1. Well that is the question? It can be 1 or maybe 100. That's something i can't predict. Or it could happen that when i find < there is not a > character and i get to EOF. So i don't have a number!?
Some questions?
1. How much buffer? Only for one char or do i allocate for the whole file?
2. I was reading about allocating memory but I'am still confused?
Can i do something like this?
I would like to write into a file this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
The part of the code that should do this:
FILE *fs;
fs=fopen("vs.xml", "wt");
Thanks Salem, i did it with the help of the FAQ.
I still have a question. Lets say i would need to find a txt file in the directory structure?
My code is listing everything. So i already have...
Hello,
i have a problem. I would like to print out everything that is on a hard drive. Like c: or d: etc...
For now i came up with this:
#include <stdarg.h>
#include <stdio.h>
I have to copy the characters from input file to the output file. But in the process i have to remove everything that is between the characters <>...
Example:
input file
Today is a <sunny>...
It's for homework.
Another question. How can you go back to the first character ('<') when i found the last one ('>')?
I thought of that. But what if i have in the text:
input file
for(i=0;i<15;i++)
output file
for(i=0;i<..... where does it end ?
So i think i cant just stop copying with this character <...
Hi,
i have a problem of removing some text from a file between this characters <>. For example:
input file
#include <stdio.h>
output file
#include <>
Thank you all, it finally worked.
Some of the print outs, i even used the "special" character type:
0123456789
┌──┐ ┐ ┌──┐ ┌──┐ ┬ ┌── ┌──┐ ┌──┐ ┌──┐ ┌──┐
│ │ │ │ │ │ │ ...
Well i still have a small problem. It doesnt print a 0 if its in the first place like 0123.. The print out is only 123. I know its because in the while statement is going for as long the number is >...
root4 thx, but i just did it by myself...as always man should not give up so soon
The one loop i will try and work out too.
And thank you mike and matsp.
I give up, i tried a couple of things but it didnt worked. :(
So i have to write a totaly different code. Because i have the 2D array of the numbers and the 2D array of the characters. I think you mean i have to do something like this:
row1: "+--+", "+",...
Mike thank you again for helping.
This is what i did:
#include <stdio.h>
char *deliStevilke[]={ // numbers representet with characters
"+--+", // 0
Kepil, i understad how to use the %10 operand. If for example i do:
8713%10
the result is 3, but this is the last digit and i have to print this one at the last place. Just thinking if i print...
Hello, i have to make a program that would print out numbers represented with characters like this:
8317
+--+ +--+ + +--+
! ! ! ! !
+--+ +--+ + +
! ! ! ! !