Posts
 
Reputation
Joined
Last Seen
Ranked #275
Strength to Increase Rep
+9
Strength to Decrease Rep
-2
80% Quality Score
Upvotes Received
43
Posts with Upvotes
38
Upvoting Members
26
Downvotes Received
9
Posts with Downvotes
9
Downvoting Members
8
14 Commented Posts
~100.25K People Reached
Interests
Dream to fly light weight plane someday. Love adventure, video games.
Favorite Forums

238 Posted Topics

Member Avatar for seo2005

1> 28 posts and still no code tag 2> Try to practice [B]int main(){}[/B] not just [B]main() or void main()[/B] 3> Post the exact error that u are getting. The code seems to be ok I think.

Member Avatar for Nehal512
0
683
Member Avatar for sneha_

In line# 41 push(root); Are you trying to push root. You should have done: push(temp); In line#50 void free(void *ptr); What you are trying to do here. Are you trying to free the memory or you want to redefine the function free() ? Better read about free(). Also, review your …

Member Avatar for deceptikon
0
2K
Member Avatar for sushlet

use while(1) loop and inside the loop read one character at a time. Break from the loop on getting something other that 0-9. Handle the space explicitly. If the numbers are multi-digit numbers you will have to use temp buffer to store the number till u get a space.

Member Avatar for sushlet
0
245
Member Avatar for nanao

1- Most importantly, what u are doing here is not proper quick sort. Read about it. 2- I don't understand why you have sent the array as "*v[]". Why do you think u need that. Why not just "v[]". 3- Putting function prototype inside another function. Not a great way …

Member Avatar for TrustyTony
0
315
Member Avatar for wnr78ta

line#14: You have never done a "new Dll11Node()" for "iterhere->_fore" and trying to access "iterhere->_fore->_back". This is an obvious segfault. Use [B]gdb[/B] to debug your code if you are working on Unix/Linux. Its not that tough to catch a segfault.

Member Avatar for wnr78ta
0
919
Member Avatar for harde
Member Avatar for sushlet
0
157
Member Avatar for ChaseRLewis

one way is: [CODE] const char* foo = "\n1\n2\n3\n4" [/CODE] another is [CODE] char* foo[] = {"1", "2", "3"} int count = 3; for(i=0;i<3;i++) printf("\n%s", foo[i]); [/CODE]

Member Avatar for ChaseRLewis
-1
115
Member Avatar for baby_c
Member Avatar for WaltP
0
217
Member Avatar for hawita

[CODE] #include<iostream> using namespace std; int main() { int *matrix; int dimension; /*read dimension first and initialise "dimension" and then allocate apropriate memory to "matrix" and then read the matrix into this array. This can also be done inside a function which will make your code more usable*/ /*process the …

Member Avatar for dkalita
0
132
Member Avatar for yashsaxena

First you must know how to retrieve the pixel data of the image. (Please google about that, I never tried it in C/C++, but its easy to get the same in Java which I have done) Then you have to know how to rotate an image(pixel-wise) [URL="http://homepages.inf.ed.ac.uk/rbf/HIPR2/rotate.htm"]http://homepages.inf.ed.ac.uk/rbf/HIPR2/rotate.htm[/URL] And then you …

Member Avatar for yashsaxena
0
116
Member Avatar for wombomatt
Member Avatar for sidrules1984
Member Avatar for thekashyap
0
186
Member Avatar for shakisparki

[CODE]typedef ListNode *ListNodePtr;[/CODE] means you are making an alias for "ListNode*" as "ListNodePtr". So when you declare avariable of type "ListNodePtr" it will mean you are declaring a variable of type "ListNode*". [CODE]ListNodePtr *sPtr; ListNodePtr startPtr;[/CODE] You will get the difference once you replace the alias name with the original …

Member Avatar for Adak
0
146
Member Avatar for ztdep

you are not resetting the stringbuffer to ""(empty string) after every iterations which is the reason why it is keeping the previous values. Reset the stringbuf at the end of every iterations then only you will get the expected outputs.

Member Avatar for jonsca
0
114
Member Avatar for ekin5683

line# 15: This is not the way you invoke a function. You should first know how to do that. Please read more about functions. Some more feedbacks: line# 22 and 26: How do you handle the loop if the number of rectangle is variable. Better have another argument in the …

Member Avatar for dkalita
0
87
Member Avatar for benjybob

[QUOTE=benjybob;1508912] 1>c:\users\ben\documents\university work\year 2\c++\code\myc++\spritelab\asteroidsgame.cpp(17): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\ben\documents\university work\year 2\c++\code\myc++\spritelab\asteroidsgame.cpp(17): error C2365: 'srand' : redefinition; previous definition was 'function' 1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdlib.h(511) : see declaration of 'srand' [/QUOTE] Error #1: This is coming because C++ …

Member Avatar for benjybob
0
424
Member Avatar for DJSAN10

Its in C itself. It is compiled and object is created which is archived in library.

Member Avatar for DJSAN10
0
161
Member Avatar for ccw87

[CODE]mylinkedlist list_arr[20];[/CODE] where "mylinkedlist" is the linked list class.

Member Avatar for dkalita
0
69
Member Avatar for kholiokhong
Member Avatar for kiranroy

[URL="http://www.google.co.in/search?hl=en&client=firefox-a&hs=6Ip&rls=org.mozilla:en-US:official&&sa=X&ei=3GF_TaIEjsq0BsCLhfkG&ved=0CG4QvwUoAQ&q=learn+guitar+strumming+patterns&spell=1#hl=en&pq=graphics.h%20in%20turbo%20c&xhr=t&q=graphics%20in%20C&cp=11&pf=p&sclient=psy&client=firefox-a&rls=org.mozilla:en-US%3Aofficial&aq=0&aqi=&aql=&oq=graphics+in&pbx=1&fp=116bc879be8b8161"]Google "graphics in C"[/URL]

Member Avatar for kiranroy
0
103
Member Avatar for chenka

If you are talking about evaluating an expression, here is the link [URL="http://scriptasylum.com/tutorials/infix_postfix/algorithms/postfix-evaluation/index.htm"]http://scriptasylum.com/tutorials/infix_postfix/algorithms/postfix-evaluation/index.htm[/URL]

Member Avatar for dkalita
0
80
Member Avatar for BroonoVilliam
Member Avatar for Taywin
0
135
Member Avatar for narlapavan

In the recvfrom() function, use "MSG_DONTWAIT" flag in the 4th argument(which is the flag) and see whether it solves your problem. By default, the method will wait until it gets a message from the mentioned address, and your program will proceed only after that. Read the manual for recvfrom() [URL="http://man-wiki.net/index.php/2:recvfrom"]http://man-wiki.net/index.php/2:recvfrom[/URL] …

Member Avatar for dkalita
0
225
Member Avatar for Tinee

Why on earth do you need a second array for reversing an array...!!! Below is a better approach to do it: [CODE] int i,j; for(i=0, j=arr_len-1;i<j;i++, j--)/*arr_len is the len of array*/ { /* swap arr[i], arr[j] */ } [/CODE]

Member Avatar for Arbus
0
177
Member Avatar for desert564

Please use CODE tags. Explain your problem clearly. Your class should be defined properly, e.g. [CODE] class spiral_matrix{ int N; int matrix_data[][]; public sparse_matrix(){ /*Constructor*/ } public init_matrix(){ /*initialize your matrix here*/ } public static void main(String argv[]){ /*...........*/ } /* other member methods*/ } [/CODE]

Member Avatar for javaAddict
0
134
Member Avatar for sanam_1

IMP: Use Code tags. StringTokenizer [URL="http://www.java-samples.com/showtutorial.php?tutorialid=236"]http://www.java-samples.com/showtutorial.php?tutorialid=236[/URL] In the below code segment [CODE] if (p > 9) System.out.print(" " + p); else System.out.print(" " + p); [/CODE] What is that you are trying to achieve. (What are you doing different for the else part)

Member Avatar for dkalita
0
95
Member Avatar for highflyer8

any data type that you can think of. User defined types, char, unsigned, etc., anything.....

Member Avatar for dkalita
0
265
Member Avatar for shinsengumi

[QUOTE=shinsengumi;1492086]Hi everyone! Is there a way/command in C to find a string that is contained in a longer string? [/QUOTE] strstr() is the answer to this problem of yours. [QUOTE=shinsengumi;1492086] I'm currently developing a C program in Windows that sends requests to a machine and gets its response through socket …

Member Avatar for shinsengumi
0
192
Member Avatar for BTW8892

before solving your problem lets look at the following code snippet [CODE] int x=4; int y=8; float z=x/y; cout<<z; [/CODE] Can you try this code and see what output you get. You might be expecting the output to be: 0.5 right ? But have a second look at the code. …

Member Avatar for BTW8892
0
1K
Member Avatar for amin2011

example: file1.h [CODE] #ifndef FILE1_H #define FILE1_H int fun(); #endif [/CODE] file1.c [CODE] #inlclude"file1.h" int fun() { printf("in fnuction"); } [/CODE] file2.c [CODE] #include"file1.h" int main() { fun(); return 0; } [/CODE] If you are using some IDE, you can directly build the project because it will do the linking …

Member Avatar for dkalita
0
125
Member Avatar for jaku78

[CODE] merge_sort((byte*)&people->name,count,sizeof(struct info),charcomp); [/CODE] This is not correct. Check what are the parameters you are sending. The prototype of the function should have been something like [CODE] void merge_sort( struct info data[], int n, int (*p_cmp_f)( ) ) ; [/CODE] And you should add another comparison function for comparing string.

Member Avatar for dkalita
0
106
Member Avatar for erogol

It wont' work if you try to send the address of the head node or any other node. The best way is to send the list data one by one through the pipe. You can use some flag values to mark when you are done with sending the values. If …

Member Avatar for dkalita
0
131
Member Avatar for sambho

I dont know what u r asking but a liked your algo for finding prime factors. Explain your query in a little more detail.

Member Avatar for rajanpathak
1
924
Member Avatar for maverick405

u have to draw the left side line and right side line in the same loop by printing col number of spaces in between

Member Avatar for yasy
0
5K
Member Avatar for gilmarP

u can store the counter value at the end of the log file. Next time its opened, goto the end and read that value, increament it, and write to the file after writting everything else in it. Let me explain: Lets start with an empty logfile. Since it doesnot exists, …

Member Avatar for NicAx64
0
222
Member Avatar for herrel17

u first try the conversion of one form to another first. After u have tested all of them in individual programs u can try to integrate them............

Member Avatar for vijay143
0
218
Member Avatar for dkalita

Hi Can anyone help me in suggesting how to prevent "out of memory" exception in java. I am getting this exception when I load a very large data in my application and after running the application for sometime the application throws this exception. I want to know if there is …

Member Avatar for peter_budo
-1
130
Member Avatar for johndoe444

Neither did you initialised i nor did you checked for the end condition. In your case since i is not initialised which have some garbage value and you are trying to access dictionary[i], which obviously will give u a segfault. Also, since you didn't put an end condition, the loop …

Member Avatar for johndoe444
0
5K
Member Avatar for nimuns

read on string handling. U are declaring a char to store a string. U are using [CODE] if(acc_name=x){} [/CODE] whereas your intention is to compare string. The above statement is an assignment and the value will be true if the assignment was successful. Read how to read and compare strings.

Member Avatar for Nick Evan
0
2K
Member Avatar for student1t

line 18: use the commented statement at line #15. remove the semicolon at its end. line #21: u are returning 0 on success. (0 is generally used as false)

Member Avatar for student1t
0
80
Member Avatar for Iam3R
Member Avatar for foxmulder

in main(), do as following: [CODE] int choice = menu();/*implement menu. It should returns the user choice*/ switch(choice) { case 1: fun1();/*your fun*/ break; case 2: fun2();/*your fun*/ break; /*some more cases as required*/ default: /*some error message*/ } [/CODE]

Member Avatar for kevinkace
0
118
Member Avatar for halluc1nati0n

then invoke the read() method before the loop to read the 1st 16 byte. If u dont want to read the remaining till the end remove the while loop. But I suppose U want to read the remaining also, then just keep them or make necessary change as u like …

Member Avatar for halluc1nati0n
1
309
Member Avatar for lotrsimp12345

when u write [CODE] vector<int> pq; vector<int> data; [/CODE] the constructor gets invoke which is [CODE] vector<int>::vector(); [/CODE] In line #41, #42, #47, #48: what do u suppose u are doing. Thats not the way how u invoke the constructor/destructor. U could have done something like: [CODE] #ifndef MY_MIN_PQ_H #define …

Member Avatar for lotrsimp12345
0
125
Member Avatar for luvsom

line #64: u are passing int * instead of int. do as [CODE] PrintOutput(*c, *d); [/CODE]

Member Avatar for luvsom
0
108
Member Avatar for lotrsimp12345
Member Avatar for dinwal

when u create a new thread it usually cannot access the memory allotted to other process including its parent. U need to use shared memory or other IPC for communication. I may not be correct totally but this is an IPC issue. Read on how to communicate between diferent processes.

Member Avatar for dinwal
0
105
Member Avatar for godsgift2dagame

[code] void Test::getNames(string[] names) { names[0] = "test1"; names[1] = "test2" return; } [/code]

Member Avatar for jonsca
0
165
Member Avatar for nychick

u will get the result by that approach also. But I would suggest u to compare the characters at the first half withe second character by character.

Member Avatar for mrnutty
0
96
Member Avatar for raigs

line #11: u are calling fun1 and expecting the ret val of fun3 line #19: u are calling fun1 and expecting the ret val of fun2

Member Avatar for twomers
0
83

The End.