- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
since few minutes I tried practice "static_cast" to convert from short variable to int variable, I wrote this trivial program to print the variables before using static_cast and after using static_cast in console screen, but the variable not converted..! [CODE] //EGYPT population | static cast #include <iostream> using namespace std; … |
|
Re:
Hi, I want to make a global 2D array ( i mean outside of the main function), so it will be available from all the functions. But my problem is how can i read it's size from the keyboard? If anyone know, plz help me. Thanks in advance. |
|
[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:
I am trying to implement my own atoi function, and I am supposed to pass my variables in after ./a.out. Here is my code: #include <stdio.h> #include <stdlib.h> int myatoi(char array[]) { int sum = 0; int i = 0; while(array[i] != '\0') { int number = array[i] - '0'; … |
|
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:
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:
hiiii frns... integer can hold only upto 8 bits...where as a string can hold more than 8 bits...so to compare them...is der any function??? like my code is like this for(int i=0;i<= stringgg("12345678901234567890"); i++) |
|
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 |