*
Type: Posts; User: kasun
Thanks, gonna check STL algo soon.
But for now, please check whether the code is OK,
'cause it doesn't prints correct values.
Here's the whole thing:
// header.h
#include<vector>
using...
I understand. But when I post that code, he was already figured out a code appropriate for his class. So I was only thinking of pointing out another way to do it, not telling to use that method, I...
"The first element in the array is the 0th element, and the last element is the (n-1th) element, where n is the size of the array."
- MSDN, Arrays.
So, input[2] means actually 3 elements -...
>> did you even read the assignment? check his restrictions...
At least "Uncertain" will learn something out of it, as I'm learning lots of things out of the questions and answers all you guys are...
(a)
#include<iostream>
using namespace std;
void Assend();
int input[2];
int i1,i2,i3;
void Assend(){
I have function - Stash::add - to recieve any kind of value,
and store that value as a byte array:
int Stash::add(const void* element) {
........
........
// Copy element into storage,...
I have below program that acts like a stack. It receives a value, then takes 1 byte of that value at a time
to store it byte-by-byte as an array of bytes. When the storage is full it dynamically...
What do you suggest as the better practice when coding a program?
1.Figure out absolutely every little detail about the functioning of structures, classes, and functions, that goes inside the...
Thanks to axon I will be having nightmares like Bill Gates chasing after me with huge BUGS in his hands!... Just kidding.
Thanks a lot for all the posts. If anybody remember anything more,...
I’m so sorry… my mistake.
Actually the code is meant to store the double value byte-by-byte in the function add. The print function is supposed to print all the values in storage, but it doesn’t...
Please point out why below code is not working properly. The program is meant to store 25 doubles and print them out again to the console.
// function add() of struct Stash, which adds values to...
Hi!
If Windows dosen't start or function properly because of missing or corrupted system files, how can I repaire Windows without formatting the disk and reinstalling the package?
Thanks. Have a...
Thanks.
But, could you please be little more specific about how
newLink->initialize(dat, head);
points head to 5 and then
head = newLink;
This is the struct Stack:
struct Stack {
struct Link {
void* data;
Link* next;
void initialize(void* dat, Link* nxt);
}* head;
Oh.. yes. I see my mistake.
- Thanks
When we say…
&(charArray[index * sizeof(int)]);
…to retrieve the address to an integer value that stored
inside a byte array, how actually it gets pointed to that
value? Isn’t we are only...
Yes, with that bit of code and using a nonproportional font I can make it.
Thanks you guys a lot for your time.
Sorry to bother you all with a similar one as my previous.
I wrote below program for the purpose of, first reading 2 files. Think of these 2 files as the 2 columns of a data table. That...
You are committing few errors here.
(1) You defined variable char x to grab the user’s input. And then you check whether it’s ‘yes’ to continue with the program, right? But the word ‘yes’ is a...
Think that the ‘-‘ character isn’t a matter. Now my problem is that, as you said, I’m writing more than the useful part of the arrays. So some invalid chars also gonna be written to fill up the rest...
I have a problem with a data table please help.
Problem: I have this 2 .dat files called LFILE & RFILE. LFILE contains some names in an M number of rows.
RFILE contains numerical values that match...