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
Ranked #4K
~6K People Reached
PC Specs
1GB ram . core2duo,19" samsung syncmaster740N,250GB sata hard disk.
Favorite Forums
Favorite Tags
c++ x 43
c x 12
Member Avatar for shankhs

can anybody suggest me whats wrong with the code?? [code] #include<iostream> #include<string> using namespace std; void rev_str(string str,int n) { while(str[n]!='\0') rev_str(str,++n); cout<<str[n-1]; } int main() { string str="shankhs"; rev_str(str,0); return 0; } [/code] thanks

Member Avatar for venugopal.somu
0
502
Member Avatar for shankhs

Hi frnds, I am a newbie to python ( I am learning it for 1 month now on win platform) .I came across these cool functions of python like os.path.isdir("\\\\blah\\") but since "blah" is password protected I am always getting false as return!!!! Can anyone please tell me how to …

0
61
Member Avatar for shankhs

Hi, I am using C/C++ for 4 years now,solving algorithmic problems only. I see many softwares that do fancy stuffs like windows softwares which automate the installation process , move the mouse automatically and buttons are clicked. Please can anyone tell me what programming language is used in such cases? …

Member Avatar for tkud
0
597
Member Avatar for mfrancis107

I'm working with Kochan's Programming in C. I am working in Visual Studio 2008. When I try to build the program I get Error 2 error C2143: syntax error : missing ';' before 'type' c:\users\michael\documents\visual studio 2008\projects\cpractice\cpractice\char.c 15 CPractice But as far as I'm aware there is no syntax error. …

Member Avatar for WaltP
0
153
Member Avatar for shankhs

I dont know whether this is the right place to post this question but I think you guys have huge experiences so... I had a course on both algorithms and software engineering , and now I feel that I can devote my time to only one of these( as these …

Member Avatar for shankhs
0
97
Member Avatar for shankhs

Can anybody please tell me what are the pre-requisites to understand the suffix trees. I am learning suffix tree from this: [url]http://www.allisons.org/ll/AlgDS/Tree/Suffix/[/url] I am not very good at algorithms and I couldnt understand how suffix trees are made. Please help me!

Member Avatar for shankhs
0
94
Member Avatar for shankhs

I have just started learning C#.... But I am not getting any good place or book to learn I know C/C++. I would also like to learn .NET(I have no idea what it is). Can you suggest some book or place from where I can start with?

Member Avatar for Ved_TheOne
0
141
Member Avatar for shankhs

I am searching an efficient algorithm to find all the palindromes in a string(actually I have to find the largest palindrome in a string).. Here is my code [code] string palindrome(string str) { int n=sz(str); for(int l=n-1;l>=0;l--)//Palindrome can be of any size. { for(int i=0;i<n-l+1;i++) { int j=i+l-1; string str2=str.substr(i,j-i+1); …

Member Avatar for cikara21
0
150
Member Avatar for shankhs

I was trying to write a program that takes an input from a file which is located in Desktop not the default directory where the program is saved [code] #include <iostream> #include <fstream> #include <stdlib.h> using namespace std; int main() { ifstream fin; string str="C:\Documents and Settings\shankhs\Desktop\ccs\Assignment CCS.txt",temp=""; cout<<str<<endl; for(int …

Member Avatar for shankhs
0
139
Member Avatar for shankhs

I am trying to solve a typical 0/1 knapsack problem (using greedy algorithm). In this problem I have to sort a structure consisting of 2 ints (one that contains the value and their corresponding amount I have to minimize the value to get `n' amounts so i need to sort) …

Member Avatar for ArkM
0
159
Member Avatar for shankhs

Hi guys! I have started learning geometry and wrote a code to calculate the distance between a line(or a segment) and a point. Here is my code: [code] #include<stdio.h> #include<math.h> #include<stdlib.h> int dot_pdt(int a[],int b[],int c[]) { int ab[2],bc[2]; ab[0]=b[0]-a[0]; ab[1]=b[1]-a[1]; bc[0]=c[0]-b[0]; bc[1]=c[1]-b[1]; // printf("%d\n",(ab[0]*bc[0]+ab[1]*bc[1])); return (ab[0]*bc[0]+ab[1]*bc[1]); } int cross_pdt(int …

Member Avatar for Prabakar
0
149
Member Avatar for aannjjaallii
Member Avatar for shankhs

I am trying to implement edit string algorithm given in: [url]http://en.wikipedia.org/wiki/Levenshtein_distance[/url] in C and I am repeatedly getting "segmentation Fault" I dont understand why......:( Here is my code [code] #include<stdio.h> #include<string.h> int minimum(int a,int b,int c) { int min; if(a<b) { if(a<c) min=a; else min=c; } else { if(c<b) min=c; …

Member Avatar for ssharish2005
0
123
Member Avatar for TheBeast32

Hi, is there a data type larger than unsigned long long int except double? I don't want double or float because I need to keep it as precise as possible. I also need it to be able to do modulus. How would I do this?

Member Avatar for TheBeast32
0
103
Member Avatar for Gagless

I want to recursively check if two strings are equal, not in size, but character by character. I am unallowed to use loops and the == operator. I tried to use two parallel arrays, but when testing my function I got undesired results. Here's what I came up with: [CODE]int …

Member Avatar for William Hemsworth
0
1K
Member Avatar for shankhs

hey guys do u know any good on line tutorial of graphs? ya i know there are many but i want the one which has source code to play around...... PLUS a detail description.... Thanx

Member Avatar for shankhs
0
98
Member Avatar for shankhs

hey I want to input a string that contain spaces such as "My name is Shankhs"; i initialized a string str; then cin>>str; but str is not taking words after spaces as if spaces are acting as a delimiter... i tried gets,getline but they does not seem to work for …

Member Avatar for shankhs
0
94
Member Avatar for shankhs

I have a problem in printing out the permutation of various characters grouped together like string 0 has"ABC" 1: "DEF" 2:"GHI" 3:"JKL" 4."MNO" 5."PRS" 6."TUV" 7."WXY" now i have to print all the permutation of the characters to form 1 letter to 12 letter words lets say i have 2512 …

Member Avatar for Duoas
0
144
Member Avatar for shankhs

Hi all, Do u have any idea that whether I can pass any function as a parameter to another function? like: [code] #include<iostream> #include<fstream> #include<vector> using namespace std; int i=5,j=8; int add() { int c=i+j; return c; } int sub() { int c=j-i; return c; } int try(int *add) { …

Member Avatar for RenjithVR
0
152
Member Avatar for shankhs

I am a newbie to windows programming environment in c++,I have to make an on-screen keyboard. I dont know how to do draw the exact layout of keyboard in Visual C++. Any help?

Member Avatar for VernonDozier
0
105
Member Avatar for shankhs

I am new to windows programming in visual studio(i mean visual c++) I made a C++ file to include WndProc(containing WM_PAINT,WM_DESTROY and WM_KEYDOWN),then I thought to include a class name CEventHandler store it in EventHandler.h The class definition in EventHandler.cpp and main in try.cpp,They all are part of a project …

Member Avatar for shankhs
0
2K
Member Avatar for shankhs

Hi guys I am trying to implement golden section search method to obtain n-th root of any number.I am testing it by finding the square root of 25 in range [4,6].the function to minimise is:[B]x^2-25.[/B] [CODE]#include<iostream> #include<cmath> using namespace std; int fnc(float &,float &); float n,num; int main() { float …

Member Avatar for shankhs
0
104