Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Forums

10 Posted Topics

Member Avatar for saransh60

[code] class List(): def __init__(self,values=0): self.numb=values self.linker=self def add(self,values): self=self.linker self.numb=values self.linker=List() def show(self): while self!=self.linker: print self.numb self=self.linker [/code] In main call i want some thing like this [code] list1=List() list1.add(43) #i want to add numbers to liked list node like this list1.add(22) list1.add(938) list1.show()#Then retrieve it from the …

Member Avatar for jLocke
0
285
Member Avatar for saransh60

hello friends i have just completed the python reading from book called "how to think like a computer scientist Python" ..Now i want to dive for Django framework for web development is that book(how to think....)is enough or should i polish my python skills first.....Please note that i have no …

Member Avatar for ssharish2005
0
129
Member Avatar for saransh60

plz see this code [icode] x=raw_input('enter any number :') def adder(d): d=d+1 adder(x) [/icode] in this function when x is passed to function adder ,,is 'x' and 'd' are copy of each other or d is reference of x..

Member Avatar for vegaseat
0
141
Member Avatar for saransh60

hi friends i am new to shell programming and learning bourne shell....this is the syntax i am using a=10.0 b=20.0 c='echo $a+$b|bc' #wanted to add two variables in c echo $c this is the .sh file that i have created but when run in terminal,it is showing "echo $a+$b" not …

Member Avatar for shibblez
0
112
Member Avatar for saransh60

I did'nt understand here in this code i was reading a book and then const char *q="Hello"; //string is fixed pointer is not *q='M'// error q="bye"; //works char * const t="Hello"; //string is fixed pointer is not *t='M'// works t="bye"; //error so my question is in first if string is …

Member Avatar for nbaztec
0
99
Member Avatar for saransh60

#include<iostream> using namespace std; class alpha{ private: int data; public: alpha(){} alpha(int a){data=a;} void display(){ cout<<data; } alpha operator =(alpha& a){ cout<<data; data=a.data; cout<<"\n assignement operator invoked"; return alpha(data); // is temporary object created is returned to a2 object ?//why it can't be returned by reference?what is the difference b/w …

Member Avatar for Narue
0
116
Member Avatar for saransh60

[code] #include <iostream> using namespace std; using std::cerr; using std::cout; using std::endl; #include <sstream> #include <string> #include <fstream> using std::ifstream; #include <cstdlib> // for exit function // This program reads values from the file '1.txt' // and echoes them to the display until a negative value // is read. int …

Member Avatar for Ancient Dragon
0
168
Member Avatar for saransh60

[code] #include <iostream> using namespace std; using std::cerr; using std::cout; using std::endl; #include <sstream> #include <string> #include <fstream> using std::ifstream; #include <cstdlib> int main() { ifstream indata; // indata is like cin char num; int sar,ri,sat,ha; sar=0;ri=0;sat=0;ha=0; char s[]=".txt"; for(int some_int=1;some_int<=3;some_int++){ ostringstream buffer; buffer <<some_int; string s1 =buffer.str(); s1+=s; indata.open(s1.c_str()); …

Member Avatar for saransh60
0
199
Member Avatar for saransh60

#include<iostream> #include<string.h> int main() { char* str="my name"; /*plz explain what is pointer-name,and what is string- name here(realy confused) ? i am new to pointers :) */ int len=strlen(str); char* ptr; ptr=new char[len+1]; /*is this ptr pointer or string*/ strcpy(ptr,str); cout<<ptr; delete ptr; /*how this works */ cout<<endl<<ptr; /*this 'ptr' …

Member Avatar for Fbody
0
135
Member Avatar for saransh60

hi i want ask how things get copied when i assign one object s1 to the another object s3(s3=s1)of the same class string in the following given example,also tell why constructor 1 needs to be initialized like str[0]='\o' ..thanks in advance [code]#include<iostream.h> #include<string.h> #include<conio.h> const int max=80; class string { …

Member Avatar for sfuo
0
142

The End.