Search Results

Showing results 1 to 40 of 92
Search took 0.07 seconds.
Search: Posts Made By: adatapost ; Forum: C++ and child forums
Forum: C++ 7 Days Ago
Replies: 6
Views: 244
Posted By adatapost
>How can I determine the size of the file so that I can read
all of the data bytes in the file?

fs->Length property.

array<Byte>^ bb= gcnew array<Byte>(fs->Length);...
Forum: C++ 26 Days Ago
Replies: 7
Views: 299
Posted By adatapost
Thanks Narue.
I really appreciate your help. I apologize for the inconvenience.
Forum: C++ 26 Days Ago
Replies: 7
Views: 299
Posted By adatapost
Qualify string identifier with std (http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5)


#include <iostream>

int main()
{
std::string firstName;
std::string lastName;...
Forum: C++ 32 Days Ago
Replies: 2
Views: 278
Posted By adatapost
To use CSS files, JavaScript files and images in resource, you must convert all links in HTML file to be the resource numbers. Take a look at this article -...
Forum: C++ Oct 8th, 2009
Replies: 4
Views: 223
Posted By adatapost
Try it,

template<class T>
T my_vector<T>::show_vector(unsigned int siz){
if(siz!=0){
show_vector(siz-1);
}
cout<<numbers[siz-1]<<"\n";
return 0;
}
Forum: C++ Oct 4th, 2009
Replies: 4
Views: 329
Posted By adatapost
Show us your code.

Method operator<< should be,

friend ostream &operator<<(ostream &out,const FixedSizeMatrix &ref){
.....
return out;
}
Forum: C++ Sep 29th, 2009
Replies: 1
Views: 200
Posted By adatapost
Abstraction is the process of generalization: taking a concrete implementation and making it applicable to different, albeit somewhat related, types of data. The classical example of abstraction is...
Forum: C++ Sep 22nd, 2009
Replies: 4
Views: 272
Posted By adatapost
You forget to assign siz member.

my_int_vector::my_int_vector(const my_int_vector& b)
{
numbers=new int[b.capacit];
siz=b.siz;
for(size_t j=0; j<b.siz; j++)
{...
Forum: C++ Sep 20th, 2009
Replies: 5
Views: 592
Posted By adatapost
Little correction to AD's post,


int DivSales::totalSales;


To Wolf CCMLG,
Take a look at static members (http://www.cplusplus.com/doc/tutorial/classes2/)
SUMMARY:
Forum: C++ Sep 16th, 2009
Replies: 7
Views: 527
Posted By adatapost
You misspelt cout,

//arrcon[1]=*scon;
//count << "arrcon[1] " << arrcon[1];


string arrcon[5][35]; is a two-dimensional string array,

arrcon[0][0]="Hello";
arrcon[0][1]=*scon;
Forum: C++ Sep 15th, 2009
Replies: 13
Views: 470
Posted By adatapost
daviddoria,

Error message says - "there are no arguments to 'getX' that depend on a template parameter, so a declaration of 'getX' must be available."

In Output3D, getX() is not used in a...
Forum: C++ Sep 14th, 2009
Replies: 2
Views: 247
Posted By adatapost
bal_1991,
Welcome to the daniweb.

Take a look at http://www.parashift.com/c++-faq-lite/templates.html
Forum: C++ Sep 11th, 2009
Replies: 5
Views: 355
Posted By adatapost
Take a look at fstream (http://www.cplusplus.com/reference/iostream/fstream/).
Forum: C++ Sep 9th, 2009
Replies: 4
Views: 472
Posted By adatapost
It's a diffcult to say anything without your code. Show us your code please. Use bb code tags - your source code must be surrounded with code (http://www.daniweb.com/forums/announcement61-3.html)...
Forum: C++ Sep 8th, 2009
Replies: 11
Views: 504
Posted By adatapost
NinjaLink,

Take a look at function definition,

double averagehigh(
int temperature[][2], // 1st argument
double average_highs, // 2nd
...
Forum: C++ Sep 8th, 2009
Replies: 8
Views: 472
Posted By adatapost
Please post your code. Linker error shows that you didn't implement such a method (post #3).
Forum: C++ Sep 4th, 2009
Replies: 8
Views: 472
Posted By adatapost
Return reference of logEvent object.


#include <string>
#include <sstream>

class logEvent
{
public:
logEvent();
Forum: C++ Aug 28th, 2009
Replies: 2
Views: 354
Posted By adatapost
>parts = new Tire*[numOfParts]; generate the error invalid conversion from?
Your code is about to create/allocate an array of Tire pointers which is illegal in this context. Create an array of...
Forum: C++ Aug 27th, 2009
Replies: 35
Views: 1,667
Posted By adatapost
Bit Masking
Setting, clearing and inverting bits while leaving others bits unchanged using Bitwise operators.

By using a string with zeroes and ones in particular spots, you can set certain bits...
Forum: C++ Aug 27th, 2009
Replies: 7
Views: 280
Posted By adatapost
>First how can I use a main...?
Using function parameters.
>and not have to give it new information.
Value parameter (Called By Value). - A new storage location is created when the value of...
Forum: C++ Aug 23rd, 2009
Replies: 11
Views: 597
Posted By adatapost
An acute thread title. Does the thread title need a fixing.
Forum: C++ Aug 18th, 2009
Replies: 7
Views: 342
Posted By adatapost
Append text to an edit control.

CEdit edit;
LPCTSTR pszText;
.....
.....

int nLength = edit.GetWindowTextLength();
// put the selection at the end of text
edit.SetSel(nLength, nLength);
Forum: C++ Aug 18th, 2009
Replies: 3
Views: 296
Posted By adatapost
the great,
study this thread -
void main vs int main (http://www.daniweb.com/forums/thread78955.html)

>I am unable to change the program. Can any one help? I am really in need of it....
Use...
Forum: C++ Aug 13th, 2009
Replies: 7
Views: 220
Posted By adatapost
Yes sir, I agree. Copy an address to the destination parameter will cause a memory leak.

and of course the following statements also causes a memory leak.

ob2 = ob1; //THIS WORKS AS INTENDED...
Forum: C++ Aug 13th, 2009
Replies: 7
Views: 220
Posted By adatapost
Due to Called by value arguments.
Value of pointer variables (an address) being copied at formal arguments. A new storage location will be create when the value of an actual argument is passed to a...
Forum: C++ Aug 12th, 2009
Replies: 3
Views: 364
Posted By adatapost
Token pasting operator.

#include <iostream>

using namespace std;
#define paster( n,m,k ) cout << "\n" << (token##n k token##m)
int main()
{
int token9 =30;
int token8=10;
Forum: C++ Aug 11th, 2009
Replies: 5
Views: 492
Posted By adatapost
for (int i=0; getline(dict,words[i],'\n'); i++) {
..
}
Forum: C++ Aug 10th, 2009
Replies: 5
Solved: loading bitmaps
Views: 524
Posted By adatapost
Download code from http://winprog.org/tutorial/ and compare it with your code.
Forum: C++ Aug 10th, 2009
Replies: 2
Solved: IsAdmin?
Views: 408
Posted By adatapost
A very good article on - How to validate user credentials on Microsoft operating systems? (http://support.microsoft.com/default.aspx?scid=kb;en-us;180548)
Forum: C++ Aug 9th, 2009
Replies: 18
Solved: Employee Class
Views: 1,128
Posted By adatapost
Fields must be initialized with constructor.

int main()
{
Employee a[3]={Employee("A",1,"A","A"),Employee("B",2,"B","B"),Employee("C",3,"C","C")};
for(int i=0;i<3;i++)
{
cout <<...
Forum: C++ Jul 30th, 2009
Replies: 3
Views: 199
Posted By adatapost
Little correction of tux4life's code.

wordRecord test; // (1)
sc.printDict(&test); // address operator was missing
Forum: C++ Jul 27th, 2009
Replies: 4
Views: 287
Posted By adatapost
You missed element is to be assigned in Post #3.

// read and save the records
for (int i = 0; i < nStudents; i++)
{
if (nStudents < MAX_STUDENTS)
{
.....
...
Forum: C++ Jul 24th, 2009
Replies: 5
Views: 790
Posted By adatapost
Yes, you can do. It is used to create Temporary object.

class One{
public:
One() {
cout << "\nConstructor";
}
~One(){
cout << "\nDestructor";
}
Forum: C++ Jul 23rd, 2009
Replies: 23
Views: 965
Posted By adatapost
Your problem is that you are still writing pointers into a file. Write only the data not any address.
Write:

char ar[3][10];
double **p;

strcpy(ar[0],"No1");
strcpy(ar[1],"No2");...
Forum: C++ Jul 22nd, 2009
Replies: 3
Views: 408
Posted By adatapost
walter clark>form1.h instead of Form1.h
File is compilation unit it is not a programming construct. Is Form1.h or form1.h included in your project?
PS: Check property of file (property windows).
Forum: C++ Jul 22nd, 2009
Replies: 23
Views: 965
Posted By adatapost
lost_scotsman,



Misconceptions about pointer.
Read or write method needs an address of data where it begins to read or write along with total numbers of bytes to be read or written...
Forum: C++ Jul 22nd, 2009
Replies: 23
Views: 965
Posted By adatapost
Forum: C++ Jul 22nd, 2009
Replies: 23
Views: 965
Posted By adatapost
lost_scotsman,
996 bytes will be the size of binary file. Calculate the size of an instance manually and put it with write & read methods.
Forum: C++ Jul 21st, 2009
Replies: 5
Views: 479
Posted By adatapost
Class CButton's create method takes button style argument - MSDN Reference (http://msdn.microsoft.com/en-us/library/tf9hd91s(VS.80).aspx)
Forum: C++ Jul 21st, 2009
Replies: 3
Views: 375
Posted By adatapost
Welcome nrobidoux,
I have try to answer the following question.


Overload a << (insertor) method; it must be friend. Insertor operator method requires two arguments. An object is supposed to be...
Showing results 1 to 40 of 92

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC