Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~3K People Reached
Favorite Tags
Member Avatar for iammfa

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; …

Member Avatar for mrnutty
0
87
Member Avatar for mimis

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.

Member Avatar for Fbody
0
93
Member Avatar for lipun4u

[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 ??

Member Avatar for lipun4u
0
71
Member Avatar for Soileau

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'; …

Member Avatar for lipun4u
-1
220
Member Avatar for lipun4u

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 …

Member Avatar for mrnutty
0
133
Member Avatar for lipun4u

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 …

Member Avatar for lipun4u
0
94
Member Avatar for NervousWreck

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 …

Member Avatar for Nick Evan
0
92
Member Avatar for lipun4u
Member Avatar for kungle
-1
92
Member Avatar for koolhoney07

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++)

Member Avatar for verruckt24
0
2K
Member Avatar for lipun4u

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

Member Avatar for GDICommander
0
105