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
~1K People Reached
Favorite Forums
Favorite Tags
c++ x 10
Member Avatar for butler273

So from the title. I'm still pretty wonky on the limitations of file streams. However is the following possible, given ofstream myfile; myfile.open ("example.txt"); while(int i=0; i<1000;i++){ functionfoo(i); } myfile.close(); and inside functionfoo we have myfile << object_1; //some other computations, essentially a placeholder or should I open and close …

Member Avatar for Ancient Dragon
0
122
Member Avatar for butler273

So, I'm back once again. This week I'm having issues with efficiency in a Radix Sort Algorithm. From what I understand this is the foundation of this algorithm. What operations might be costing me? For the basics I suppose I do understand push_ back being costly having to copy the …

Member Avatar for butler273
0
209
Member Avatar for butler273

This function of this find the median of three values inside an array. I was wondering if there's a more elegant solution to finding the median value between 3 values. [CODE] int mid =((p+r)/ 2); if(V[p]<V[r]){ if(V[p]<V[mid]){ if(V[mid]<V[r]) swapfunc(V[mid],V[r]); } else swapfunc(V[p],V[r]); } else{ if(V[r]<V[mid]){ if(V[p]<V[mid]) swapfunc(V[p],V[r]); else swapfunc(V[mid],V[r]); } …

Member Avatar for butler273
0
239
Member Avatar for butler273

Howdy all. I'm having an issue tackling my assignment. my givens are I have an int pointer, which is supposed to point to an array of values. This pointer is in a private part of my class. However, I have a specific set of values I want to pass in, …

Member Avatar for Labdabeta
0
154
Member Avatar for butler273

So, as follows I have a basic while loop. It's working fine, however whenever I enter something other than a number or EoF, it goes through the loop one time after I'm wanting it to stop. Say I enter 5, then EoF, it enters an extra 5, so I have …

Member Avatar for subith86
0
148
Member Avatar for butler273

So this is probably going to seem like an obviously simple question. I'm working on a basic project involving linked lists. I have a single link linked-list, within this linked list I have a pointer to an dynamically allocated Object I'd like to be printed, currently I keep getting rubbish …

Member Avatar for mitrmkar
0
197