I didn't realize there was a memory leak involved in the mere use of the pointer in C. But essentially your statement of how C looks at arrays was going to be my attempt. The fact that you have a...
Type: Posts; User: DJPlayer
I didn't realize there was a memory leak involved in the mere use of the pointer in C. But essentially your statement of how C looks at arrays was going to be my attempt. The fact that you have a...
Just a thought.. but notice I cannot use the = operator on array variables but I can use it on primitive data types that use name equivalence. Difference being == , vs. =. So possibly a way to...
structural equivalence is basically the same structure (vs type name). I'm assuming with arrays we include that to be the same primitive data stored as well as it's amount of memory allocation.
...
"That array constructor in C does not construct a new type and structural equivalence is applied to arrays. How can your write code to test this? i.e. how can you test that C uses structural...
nope.. I was looking through some other commands like typeof() etc.. because of the structure of arrays it's very difficult to make a comparison. I've been searching for a hint for the past day...
this is what lead me to the possibility of using the sizeof(). Very confusing question to say the least..
homework - Are two int arrays of different size "type equivalent" in C? - Stack Overflow
Does anyone know how to test the structural equivalence of an array in C?
I'm unsure if I should be tested the size of the array. Or the 1st element of the array (b/c the name is equivalent to a...
just screwing around and I didn't follow your constraints. but this is the general idea of how it works.. of course you need to use a function taking 2 doubles and return a double (the max). You...
if you are new to C++ why are starting out with functions in classes?? You might wanna hold off on the object oriented side until you can get past functions and loops.
was worded rather poorly. edited to fix.
I randomly grabbed 16 values from a text file. Now I want to that those 16 random letters and randomly place them in a 2d array. Currently I'm putting...
This is a large never ending project .. but a piece at this point is to:
currently I'm taking a random value from a text file.. There are 16 values grabbed and placed in a 2d array 4x4.
...
I can compile your code w/o error...
sounds good, I'll give the 2D array a shot then.. thanx
I should explain what I have:
int array[5] // each of the spaces has an integer value in it, say "1,2,1,2"
char one[5]="blah"
char two[5]="wassa"
now I want to cout "blah wassa blah wassa"...
I'll explain basically what I'm doing.. Since I'm just looking for a step I don't think any code needs to be posted.
I took a user input and turned it into a integer array (I needed to run some...
my grammar was somehow horrid on that quote.. but.. I'll explain.
Pod and Phone both used the function mute. I had to use the PodPhone instead of Pod or Phone to control the muting/unmuting of...
thanx.. after some time I did get through it.. had some major syntax issues obviously..
I used destructors but did you virtual inheritance in PodPhone class that would seperately work the mute...
this is my basic code and comments on what will/should go on..
class Phone
{
public:
void dial(int* number)
{ cout << "Dialing " << number << "...\n"; }
I think I have but I'm obviously just missing some very stupid obvious basic syntax..
in my generic program what syntax would I use to to print "blah blah" via the print function..
using very very simple functions because need to use inheritance in multiple classes
so let's say I said
class a {
public:
void print()
this one piece of code has me going nutz.. I'm essentially trying to predict the next move..
everything is based in columns and rows for a 2 dimensional array.. do I define the current positon to...
no you're absolutely correct.. just as starting point is [1,1]. You location would always change the movement goes along. 17 columns, 20 rows.. as long as I'm not allowing myself to go through...
with that area of the loop. I'm just adding 1 to the column or row. problem being that I'm looking over my code and notice that I can't use a definate position #. Need to use the current position...
just trying to finish up this maze.. getting a little fustrated when getting close to completion. Anyone? I bolded the areas I'm a little lost on how to complete.
const int ROW_SIZE = 20,...
I just took my exam.. so I ended up learning alot more about how it probably should be done..
the file should most likely be stored as a 2 dimensional array.
the file comparison to validate is...