- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
Hey everyone, I am pretty new to writing procedures that deal with this idea of recursion. I am trying to get into that certain frame of mind but I am having a little bit of trouble at the last minute. My goal was to implement a text operation called swap … |
|
Hi Guys. Random no.'s always bother me.So,I want to start a discussion over their uniform distribution. Given : rand5() which generates randomly distributed no. from 1-5. To Code: rand7() which generates randomly distributed no. from 1-5. You have to give code using rand5() as well as without using it. Thanks, |
|
Re:
[CODE] vector<vector <vector<char>>> Sub; Sub[0][0].push_back(s[0]);Sub[0][0].push_back('\0'); Sub[0][1].push_back('\0'); [/CODE] I have the above code and it says "vector subscript insaccessible" for the assignments.What could the reason? Thanks in advance, Prasanna |
|
Code 1: [code]#include<iostream> using namespace std; int& func() { int a=6; return a; } int main(void) { int a = func(); cout<<a; cin.get(); return 0; } [/code] According to my thought , first of all func() will create a temporary reference to a (as it is returning by reference) , … |
|
Hello guys. I currently code in C++.But I want to gain knowledge of internals of C++.So , I want to analyse my each and every program in ASM. I use Windows 7 platform and code::blocks.Please provide necessary information or tools , which can help me in this regard. Thanks! |
|
Re:
I have a problem passing an array containing pointers. Here's the function.. [code=c++] void jointtree(Parent *clique[], int nodes); [/code] I am calling it the following way.. [code=c++] jointtree(clique, nodes); [/code] where clique is. [code=c++] Parent *clique[nodes]; [/code] |
|
[CODE]int main() { FILE *fp; unsigned long size; unsigned char *loc; fp=fopen("Hello.exe","rb"); if(fp==NULL) { printf("\nCouldn't load file"); getchar(); return 0; } fseek(fp,0,SEEK_END); size = ftell(fp); fseek(fp,0,SEEK_SET); loc=(unsigned char*)malloc(sizeof(size)); printf("\nSize of file is : %d",size); if(loc==NULL){ printf("\nError in allocating memory."); } printf("\nFread called"); fread(loc,size,1,fp); printf("\nFread fails:"); return 0; } [/CODE] I … |
|
[CODE]class mymatrix{ private: int** arr; int m ,n; public: mymatrix() { std::cout<<"\nConstructor entered."; std::cout<<"\nEnter no. of rows of the matrix:"; std::cin>>m; std::cout<<"\nEnter no. of columns of the matrix:"; std::cin>>n; arr = new int*[m]; for(int i=0;i<m;i++) { arr[i]=new int[n]; } std::cout<<"\nConstructor exited."; } /****************************************************************************************/ mymatrix (mymatrix& t) { m=t.m; n=t.n; std::cout<<"\nCopy … |