- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
- PC Specs
- 1GB ram . core2duo,19" samsung syncmaster740N,250GB sata hard disk.
22 Posted Topics
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 | |
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 … | |
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? … | |
Re: [QUOTE=WaltP;1120333]Why?[/QUOTE] Because at first we can declare something like: int *a; and then scanf("%d",&n); a=malloc(sizeof(int[n])); then we wont require value of 'n' prior to the array declaration. | |
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 … | |
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! | |
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? | |
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); … | |
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 … | |
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) … | |
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 … | |
Re: Pretty harsh reply by AncientDragon but a very good one... Just google it and you will find methods and even the source code. ![]() | |
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; … | |
Re: tesuji how large you want your number to be??? However large it is it is always generated by computer try multiplying two largest numbers known to u and I think you will end up with getting a longer number!!!!!! (you can use FFT algorithm to multiply extremely large numbers) | |
Re: [QUOTE=Gagless;616660]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 … | |
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 | |
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 … | |
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 … | |
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) { … | |
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? | |
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 … | |
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 … |
The End.