Search Results

Showing results 1 to 40 of 63
Search took 0.01 seconds.
Search: Posts Made By: rowly
Forum: C Aug 22nd, 2007
Replies: 5
Views: 660
Posted By rowly
wel this code fit inside a fuction which fill a deck of cards (52 cards)
knowing that ->

static char *s[] = {"Hearts","Diamonds","Clubs","Spades"};
static char *v[] =...
Forum: C Aug 21st, 2007
Replies: 5
Views: 660
Posted By rowly
can anyone help me with this code i just cant understand !
its about filling a deck of cards
thx

for (i = 0; i < 52; i++)
{
deck[i] = (i % 13)<<2;
deck[i] += i / 13;
if(i/13 < 2)
...
Forum: C Apr 11th, 2007
Replies: 13
Views: 6,296
Posted By rowly
no champ, no there is no text file we just have to test...
./a.out hello world ....
thats all
Forum: C Apr 11th, 2007
Replies: 13
Views: 6,296
Posted By rowly
aw zn this test is wrong ?!
c.exe abc def file.txt
argv[1]=abc
argv[2]=def
argv[3]=file.txt

input: abc
buffer = def
input :cajef
buffer= fdjef?!
Forum: C Apr 11th, 2007
Replies: 13
Views: 6,296
Posted By rowly
aha but is this the right logic Ancient Dragon ?!
coz looking at his code he seems that he used a totally different logic !

is this the right test for the program ?!

c.exe abc def file.txt...
Forum: C Apr 10th, 2007
Replies: 3
Views: 1,077
Posted By rowly
still getting the same thing...

#include <stdio.h>
#include<stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
main(int ab, char** ar)
{
char buff[800];
Forum: C Apr 10th, 2007
Replies: 3
Views: 1,077
Posted By rowly
hey guyz, i'm trying to search each ar for matching characters in the buff, but I seem to be getting a buffer overflow. Can anyone give me any pointers, any help would be appreciated, this is my...
Forum: C Apr 10th, 2007
Replies: 6
Views: 1,579
Posted By rowly
hello guyz, is there any user input i mean like is there fgets ?!
because ./a.out abc def blabla
please enter character : jdk
bef
... ?! is this how it should go ?!
Forum: C Apr 10th, 2007
Replies: 6
Views: 1,579
Posted By rowly
alright guyz is that the right logic ?!

replace.exe abc def outputfile.txt

e.g

input output abab dede a ...
Forum: C Apr 7th, 2007
Replies: 6
Views: 1,579
Posted By rowly
aha
ok zn i'll start with coding...
thx alote mate
Forum: C Apr 7th, 2007
Replies: 6
Views: 1,579
Posted By rowly
umm beauty ! it easy now :) and the ouptputfile.txt should contain only derdfddderd which the last output isn't ?!
1 more question is it right to read from buffer straight away?
for example ...
Forum: C Apr 7th, 2007
Replies: 6
Views: 1,579
Posted By rowly
Hey guyz, I'm stuck with this given, its bit hard I cant understand it just wonna know the logic ( no codes).

Its saying write a C program which read from standard input, replaces all the...
Forum: C Apr 1st, 2007
Replies: 10
Solved: Stack in C
Views: 7,887
Posted By rowly
Thats it zn :)
thanks alote guyz i appreciate it !
Forum: C Apr 1st, 2007
Replies: 10
Solved: Stack in C
Views: 7,887
Posted By rowly
umm ehehe :lol: thats pretty easy i couldnt see that :cheesy:
so

delete_stack(POINTER *TOP)
{
POINTER TOP3;
while (Top !=NULL)
{
pop(Top);
*Top = Top3->next;
Forum: C Apr 1st, 2007
Replies: 10
Solved: Stack in C
Views: 7,887
Posted By rowly
i'm trying to get the delete function but do i have to use loop as wel to delete the stack contents ?!
this is what i got without using the pop function.

delete_stack(POINTER *TOP)
{
POINTER...
Forum: C Apr 1st, 2007
Replies: 10
Solved: Stack in C
Views: 7,887
Posted By rowly
aw thats beautifull mate !
but why it keeps giving me a Segmentation fault when i try to add the push_string function inside the main ?!
am i using the wrong syntax ?!

for example

int...
Forum: C Apr 1st, 2007
Replies: 10
Solved: Stack in C
Views: 7,887
Posted By rowly
you mean the same as push but i'll add a for loop for example:

for(i=0;buff[i]!='\0';i++)
{
void push(POINTER *Top, stackitem a)
}

so it keeps taking characters untill eof right ?!
Forum: C Apr 1st, 2007
Replies: 10
Solved: Stack in C
Views: 7,887
Posted By rowly
Hello guyz i'm trying to write a stack program in C...

Push one character onto the stack. Your function should have the prototype:
void push(POINTER *Top,stackitem a);
2. Push a string of...
Forum: Game Development Nov 2nd, 2006
Replies: 49
Views: 13,223
Posted By rowly
Hahah i prefer to buy it for 80$ ! :)
Forum: C++ Nov 1st, 2006
Replies: 7
Views: 6,415
Posted By rowly
try this MDA (http://www.cplusplus.com/doc/tutorial/arrays.html)
you want my advise read every c++ program in ya book and you will understand it coz ya cant hit it from the 1st step... its not that...
Forum: C++ Oct 27th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
Haha :) i did it !!!! just push and address and pop the contents hahha :)

weight.push(&student[i].weight)
printf("%2.2f",(*(double *)weight.pop()));

Ancient Dragon hehe it was your idea ;)...
Forum: C++ Oct 26th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
wel pushing the whole string into the stack is a better idea when it comes to double(or probably compiler coz ~s.o.s~ got it right ) ! actually i searched the whole net for converting from double to...
Forum: C++ Oct 25th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
#include"stdafx.h"
#include<stdio.h>
#include<stdlib.h>
enum sex {male, female};
typedefstruct data {
char fname[30];
sex MF;
int age;
double wit;
}records;
Forum: C++ Oct 25th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
Hello guyz i'm still getting an error about conversion from double to void*
i'll appreciate any Help :)
BTW i tried to push the name and age and sex it works but when i try to push the double...
Forum: Database Design Oct 21st, 2006
Replies: 0
Fd
Views: 1,625
Posted By rowly
Fd
Hello, guyz i just wonna check if this the right function dependencies for this table(about angency that supply staff to hotels within moscow)
i'll appreciate any Help !
instand cover agency !
NIN...
Forum: C++ Oct 19th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
Anyways MAte THX aLOta :) ya da champ !
i'll work on that tomorrow ! :)
its 4 am in here cheers gnit !
Forum: C++ Oct 19th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
aw ok !
is this the right conversion from int double to void ?!
... = * (int *) ...;
...= * (double*)...;
the hardest part is enum hahah lol how i'm gonna convert from sex to void* heheh...
Forum: C++ Oct 19th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
#include"stdafx.h"
#include<stdio.h>
#include<stdlib.h>
enum sex {male, female};
typedefstruct data {
char fname[30];
sex MF;
int age;
double wit;
}records;
Forum: C++ Oct 19th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
nop still getting the same characters هٍ↕
Forum: C++ Oct 19th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
well when i run the code i got this output : هٍ↕هٍ↕ and i should get "fredy" instead !
i tried to put printf("%s",layer) in the push function, it works fine i got fredy as myobject (just for test...
Forum: C++ Oct 19th, 2006
Replies: 22
Solved: void pointers
Views: 6,407
Posted By rowly
hello guyz iv got problem with void pointers i cant work this out !
i'm trying to read from a binary file using a struct and pass this struct arrays to class object and push them to stack and...
Forum: C++ Oct 18th, 2006
Replies: 13
Views: 3,114
Posted By rowly
what activation record and what procedure ?!!
post your code mate !
Forum: C Oct 18th, 2006
Replies: 2
Solved: void pointer
Views: 2,920
Posted By rowly
oups 1 mistake :p
aw ok hehe thats seems easy now :)
anyways found that useful void pointers (http://www.cplusplus.com/doc/tutorial/pointers.html)as well thx alote andor
Forum: C Oct 18th, 2006
Replies: 2
Solved: void pointer
Views: 2,920
Posted By rowly
can any one help with this function how it works !
thanks u

int compare(const void *a,const void *b)
{
data i= *(data *)a;
data j= *(data *)b;

if (i.Mark==j.Mark) return 0;
if...
Forum: C Oct 17th, 2006
Replies: 3
Solved: enum
Views: 1,417
Posted By rowly
is that same as condition ?! like if records[i].m_f == 0 print male else print female ?!
Forum: C Oct 17th, 2006
Replies: 3
Solved: enum
Views: 1,417
Posted By rowly
hello,
i have a problem with printing records[i].M_F on the screen while reading from a binary file.
i'll appreciate any help !
THank U

#include "stdafx.h"
#include <stdio.h>
#include...
Forum: C++ Oct 17th, 2006
Replies: 7
Views: 1,593
Posted By rowly
you cant use the same same name if you wonna do so
change the parameters name inside the function...

void getData(int& diam, int& pr)
{
cout << "Enter in the diameter of the pizza...
Forum: C++ Oct 17th, 2006
Replies: 7
Views: 1,593
Posted By rowly
int a,b;
getData(a,b);
Forum: C++ Oct 15th, 2006
Replies: 9
Views: 1,729
Posted By rowly
Hello, I couldnt get wt u r trying to do !
but i can tell that ya have problem with structers (http://www.cplusplus.com/doc/tutorial/structures.html) and functions...
Forum: C Oct 14th, 2006
Replies: 8
Views: 1,510
Posted By rowly
Thanks for replying mate ! wel thats true ! i have to use some parameters but thats the problem specifications and i cant change them at all !
they gave us the function parameters for push and pop...
Showing results 1 to 40 of 63

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC