- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
10 Posted Topics
Re: hey though u r converting it to int, u r trying to store in a short int variable. So it is implicitly being converted to short int. so the op is like this !!! | |
Re: if u want 2 create a static array, u have make the array dimension known at the compile time. so u have no option to take the size from user. his is only possible by means of dynamic array. | |
[QUOTE]The static_cast operator can explicitly convert an integral value to an enumeration type. If the value of the integral type does not fall within the range of enumeration values, the resulting enumeration value is undefined.[/QUOTE] Can somebody explain the above stuff with example ?? | |
Re: how about this... [CODE=cpp]#include <stdio.h> int _atoi(char[]); int main() { printf("%d\n", _atoi("100")); printf("%d\n", _atoi("10as20")); printf("%d\n", _atoi("fuck")); getch(); return 0; } int _atoi(char s[]) { int i, n=0; for(i=0; s[i]>='0' && s[i]<='9'; i++) n = 10*n + (s[i] - '0'); return n; } [/CODE] | |
I was trying to implement operator overloading in c-string in the following code [CODE=cpp]#include <cstring> #include <iostream> using namespace std; class string { char *st; int len; public: string():st(NULL), len(0) {} string(const char *s); string(const string & s); ~string(); friend string operator+(const string &s1, const string & s2); friend int … | |
Look at the following code... [CODE=cpp]#include <iostream> #include <cstring> using namespace std; class string { char *p; int len; public: string(char *); void show() { cout<<p<<endl; } }; string :: string(char *p) { len = strlen(p); this.p = new char[len+1]; strcpy(this.p, p); } int main() { string s1, s2; char … | |
Re: [QUOTE=NervousWreck;1014339]I am writing a fake banking program. In the function below I declare a dynamic array. [CODE]void trArr(int transactions) { int n; string* accUse = new string[transactions]; return; }[/CODE] I try to access the array in a later function but I get the error "not declared at this scope. I … | |
Can somebody suggest me, which book is best for shell script and available in India ?? | |
Re: r u talking ab integers of more than 10 bytes ..like 12345678910228377466464678262737867865786826868326??? | |
I have been learning DrScheme (Textual MzScheme) as my Pre-ILP. Is there any equivalent operations in list like string-ref, substring, string-set!, string, etc ?? Thanx |
The End.