Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
c++ x 8
java x 6
c x 2
Member Avatar for vladdy191

Hello I'm trying to copy a character pointer into another character pointer. I currently have [CODE]static char *my_kstrdup(const char *buf) { char *ptr, *ret; ret = ptr = kmalloc(strlen(buf)); if(ptr = NULL) panic("kmalloc returned NULL"); for(; *buf != '\0'; ++ptr, ++buf) *ptr = *buf; *ptr = '\0'; return ret; }[/CODE] …

Member Avatar for Dave Sinkula
0
70
Member Avatar for vladdy191

I'm trying to make a symbol table, for a project. The project as a whole is a translator/compiler that translates an imaginary language into java. I have everything down except for the symbol table. I am currently using a Stack of Lists. The Lists are vectors of Strings so I …

Member Avatar for ~s.o.s~
0
119
Member Avatar for vladdy191

I'm looking at this code and I'm not sure what it prints (I don't have a C++ compiler to run it). However, I also would like to understand why it prints what it does? hope someone can help, here's the code: [CODE] class A { public: virtual void p() { …

Member Avatar for dougy83
0
132
Member Avatar for vladdy191

Given this piece of code [CODE] void swap(int x, int y) { x= x + y; y= x - y; x= x - y; } main () { i = 1; a[0]=2; a[1]=1; a[2]=0; swap(i,a[i]); printf("%d %d %d %d\n", i, a[0], a[1], a[2]); swap(a[i], a[i]) printf("%d %d %d %d\n", i, …

Member Avatar for Lerner
0
81
Member Avatar for vladdy191

I'm trying to read in a text file character by character. However, when I try to read it in it using the readChar method in DataInputStream it gives me a IOException. Heres what I have so far [CODE] FileInputStream stream; try { // Open an input stream stream = new …

Member Avatar for destin
0
431
Member Avatar for vladdy191

So explicit parametric polymorphism need not be restricted to a single type parameter. In other words I can write this in C++ [CODE]template <typename First, typename Second> struct Pair { First f; Second s; };[/CODE] Can someone help me write a funciton "makePair" that takes two paramters of different types …

Member Avatar for vijayan121
0
139
Member Avatar for vladdy191

If I have these function variables: int (*f)(int); int (*g)(int); int (*h)(char); why can I do the assingment f=g but if I do h=g the C compiler gives me warning while the C++ compiler gives me an error. Can any one please explain this to me.

Member Avatar for Ancient Dragon
0
122
Member Avatar for vladdy191

I'm doing a project for a class and it says to write a program that translates code from one programming language to another. It says that my class containing my static main method should be named "Translate". It should take as input source code of a programming language as a …

Member Avatar for javaAddict
0
81
Member Avatar for vladdy191

What does == test when applied to arrays in C++? Does it test for type equivalence or equal memory locations?

Member Avatar for skatamatic
0
88
Member Avatar for vladdy191

Given the following function variables declarations in C++: int (*f)(int); int (*g)(int); int (*h)(char); when try to assign f=g its fine but trying to do h=g gives an error with a C++ compiler, can anyone tell me why this is?

Member Avatar for skatamatic
0
142