Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
4
Posts with Downvotes
2
Downvoting Members
4
1 Commented Post
0 Endorsements
Ranked #4K
~9K People Reached
Favorite Forums

31 Posted Topics

Member Avatar for rockerjhr

ok so I was doing a a function that would find the square root of a number to a certain precision using newtons method and this is what I came up with /* * File: main.cpp * * * Created on July 6, 2012, 6:58 PM */ #include <iostream> #include …

Member Avatar for mike_2000_17
0
1K
Member Avatar for rockerjhr

pushl %ebp movl %esp,%ebp pushl %ebx movl 8(%ebp),%ebx leal 2(%ebx),%edx xorl %ecx,%ecx cmpl %ebx,%ecx jge .L4 .L6: leal 5(%ecx,%edx),%edx leal 3(%ecx),%eax imull %eax,%edx incl %ecx cmpl %ebx,%ecx jl .L6 .L4: movl %edx,%eax popl %ebx movl %ebp,%esp popl %ebp ret trying to make code in c then compiling it with the …

Member Avatar for BlZbB
0
256
Member Avatar for rockerjhr

UniversityDatabse.h [CODE]#include<string> #include<stdexcept> #include<iostream> #include<map> #include "UniversityPerson.h" class UniversityPerson ; using namespace std ; #ifndef UNIVERSITYDATABASE_H #define UNIVERSITYDATABASE_H class UniversityDatabase { public: UniversityDatabase() ; ~UniversityDatabase() ; void print() ; void Create(UniversityPerson *p ) ; void Delete1( string name ) ; void Delete2( string id ) ; UniversityPerson *Lookup1(string id ) …

Member Avatar for ravenous
0
423
Member Avatar for rockerjhr

Im new to asembly in general and im trying to learn but i kind of not get a lot of stuff in IA32 how do I convert this: [CODE]pushl %ebp movl %esp,%ebp movl 8(%ebp),%edx movl 12(%ebp),%eax movl %ebp,%esp movl (%edx),%edx addl %edx,(%eax) movl %edx,%eax popl %ebp ret[/CODE] to C ? …

Member Avatar for rockerjhr
0
124
Member Avatar for rockerjhr

so i have to make a function that displays the binary representation of a 32 bit integer this is what i have [CODE]#include<stdio.h> #include<stdlib.h> #include <string.h> #include<stdio.h> void inttobin(int c) { char * s ; char * p ; size_t n = 8*sizeof(unsigned int); p = malloc(n*sizeof(char)); while (n-- > …

Member Avatar for Narue
0
128
Member Avatar for rockerjhr
Member Avatar for nuclear
0
161
Member Avatar for rockerjhr

Card shuffling and dealing create a program to shuffle and deal a deck of cards,the program should consist of a clas card a class deck of cards and a driver program To deal a card, the driver just prints it out. The dealCard function does not print anything. this is …

Member Avatar for raptr_dflo
0
171
Member Avatar for rockerjhr

if you declared/defined a virtual function for a class and redefined it in a derived class so that when you call the derived class it calls its own version of the function and not the base class function , how do you call the base class function on the definition …

Member Avatar for Fbody
0
196
Member Avatar for rockerjhr

Ok so i have to create a program that computes the convex hull of a bunch of random points but i have no idea where to start i mean i know how the program is supposed to work since you can just easily look up the pseudo code but i …

Member Avatar for raptr_dflo
0
231
Member Avatar for d_panayotov

a->variable = the variable field of the struct a points to a.variable = the variable field of the struct a

Member Avatar for rockerjhr
0
204
Member Avatar for tubby123

I used a 2 d array of characters to make the board of my four in a row program made a state struct that had different fields including a brd field which was a board a 2d array then that had the configuration of every move in it and stored …

Member Avatar for rockerjhr
0
152
Member Avatar for rockerjhr

main.c [CODE]#include "stack.h" #include "stack_interface.h" #include "lex.h" #include <stdio.h> #include <stdlib.h> #define PUSH(s,c) if(push_char(s,c) == ERROR){ printf("Fatal error in pushing symbol on stack.\n") ; exit(1) ; } #define POP(s,c) if(pop_char(s,c) == ERROR){ printf("Fatal error in poping symbol off stack.\n") ; exit(1) ; } #define TOP(s,c) if(top_char(s,c) == ERROR){ printf("Fatal error …

Member Avatar for Narue
0
257
Member Avatar for Sourish90

the best book for data structures in my opinion is "Data structures an advanced approach using C" by Jeffrey Esakov and Tom Weiss you could start by learning about stacks and then implementing them in a parenthesis checker program

Member Avatar for tomato.pgn
0
238
Member Avatar for rockerjhr

Suppose there are n ducks floating on the pond in a circle. The pond is also home for an alligator with a fondness for ducks. Beginning at the 1st position, the alligator counts around the circle and eats every mth duck (the circle closing as ducks are eaten). For example, …

Member Avatar for rockerjhr
0
194
Member Avatar for write2diba
Member Avatar for rockerjhr

globals.h [CODE] #ifndef _globals #define _globals #define DATA( L ) ( ( L ) -> datapointer ) #define NEXT( L ) ( ( L ) -> next ) typedef enum { OK, ERROR } status ; typedef enum { FALSE = 0 , TRUE=1 } bool ; typedef void *generic_ptr …

Member Avatar for rockerjhr
0
141
Member Avatar for Sheldon.

dont you just pass it like this int A[6][6] ; func(int A[ ][6]){ .............. } leave the first blank and specify the second?

Member Avatar for Sheldon.
-1
73
Member Avatar for rockerjhr

radixsort.c [CODE]/**************************************************************************************/ /* Radix Sort of integers numbers using polymorphic linked lists. */ /**************************************************************************************/ #include <stdio.h> #include "list.h" #include <stdlib.h> #include "numberinterface.h" #include <math.h> void static refill( int A[] , list Bins[] ) ; int static getdigit( int number, int position ) ; int main( int argc, char *argv[] ) …

Member Avatar for Ancient Dragon
0
238
Member Avatar for rockerjhr

How do i know if two linked lists are set equal? if L1 and L2 are linked lists set equal meaning the set of values of the nodes in L1 is the same as the set of values of the nodes in L2 and order does not matter i know …

Member Avatar for L7Sqr
0
873
Member Avatar for rockerjhr

if i have an array of ints and an array of lists like : list Bins[10] and i initialize all the lists in the bins array to null except bins[3] and lets say Bins[3] has 1 node that has the number 8 in it how do i get that number …

Member Avatar for griswolf
0
106
Member Avatar for rockerjhr

this is what i have so fa r globals.h [CODE] #ifndef _globals #define _globals #define NEXT(L) ( (L) -> next ) #define DATA(T) ( (T) -> datapointer ) #define LEFT(T) ( (T) -> left ) #define RIGHT(T) ( (T) -> right ) typedef enum { OK, ERROR } status ; …

Member Avatar for abhimanipal
0
188
Member Avatar for rockerjhr

globals.h [CODE] #ifndef _globals #define _globals #define NEXT(L) ( (L) -> next ) #define DATA(T) ( (T) -> datapointer ) #define LEFT(T) ( (T) -> left ) #define RIGHT(T) ( (T) -> right ) typedef enum { OK, ERROR } status ; typedef enum { FALSE=0 , TRUE=1 } bool …

Member Avatar for WaltP
0
206
Member Avatar for rockerjhr

[CODE]i need a function that checks in two linked lists are equal thi is what i have so far bool equal(list L1 , list L2 , int (*p_cmp_f)() ){ if( L1==NULL && L2==NULL) return TRUE; else if( L1==NULL || L2==NULL) return FALSE; else if( (*p_cmp_f)(L1->data,L2->data) == -1) return FALSE; else …

Member Avatar for rockerjhr
0
210
Member Avatar for rockerjhr

[CODE]#include <stdio.h> #include <stdlib.h> #include "globals.h" #include "list.h" status write_int(generic_ptr p_n)){ printf(" %d " , *(int *)p_n ) ; return OK ; } int compare_int( generic_ptr x , generic_ptr y){ if( *(int*) x < *(int *)y ) return -1 ; if( *(int*) x > *(int *)y ) return 1 ; …

Member Avatar for rubberman
0
204
Member Avatar for rockerjhr

quicksort.c [CODE]#include "quicksort.h" int compare( byte *a , byte *b ) ; void memswap( byte *s, byte *t, int count ) { byte tmp ; while (count-- > 0 ){ tmp = *s ; *s++ = *t ; *t++ = tmp ; } } byte *select_pivot(byte data[], int n , …

Member Avatar for gerard4143
0
248
Member Avatar for rockerjhr

I need to use mergesort to sort the data in a file that has the names and ages of 10 different people , first i have to sort the names in ascending ascii order and then i have to sort them by their age but im not sure how to …

Member Avatar for rockerjhr
0
219
Member Avatar for rockerjhr

ok here are the files [B]globals.h[/B] [CODE] #ifndef _globals #define _globals #define DATA( L ) ( ( L ) -> datapointer ) #define NEXT( L ) ( ( L ) -> next ) typedef enum { OK, ERROR } status ; typedef enum { FALSE = 0 , TRUE=1 } …

Member Avatar for Adak
0
287
Member Avatar for rockerjhr

i have to impplement a dynamic stack to create a program but when i try to compile my stack.c file(with gcc) I get a bunch of errors here are my files GLOBALS.h [CODE] #ifndef _globals #define _globals #define DATA( L ) ( ( L ) -> datapointer ) #define NEXT( …

Member Avatar for rockerjhr
0
312
Member Avatar for rockerjhr

could someone explain to me why the compiler(gcc) outputs a warning that the control reaches the end of a non void function? [CODE] #include <stdio.h> #include "stack.h" #include "globals.h" #include "stack_interface.h" #define ERR_PUSH "Error in pushing symbol (character #%d).\n" #define ERR_POP "Error in popping symbol tp match character #%d.\n" #define …

Member Avatar for nezachem
0
219
Member Avatar for rockerjhr

trying to do a program that sums all the even numbers in the sequence but i think im doing it wrong heres my code [CODE]#include <stdio.h> int fib ( int n ); int main ( int argc, char *argv[ ] ) { int i , sum = 0 ; for(i …

Member Avatar for rockerjhr
0
115
Member Avatar for rockerjhr

how do i make a program that calculates the product of two vectors in C ? this is what i have but i think im doing it wrong i need some help? [CODE]#include <stdio.h> double inner(double m[ ] , double n[ ] , int size ) ; int main( int …

Member Avatar for Dervish1
0
243

The End.