Forum: C++ 7 Days Ago |
| Replies: 6 Views: 244 >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 Thanks Narue.
I really appreciate your help. I apologize for the inconvenience. |
Forum: C++ 26 Days Ago |
| Replies: 7 Views: 299 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 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 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 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 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 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 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 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 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 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 Take a look at fstream (http://www.cplusplus.com/reference/iostream/fstream/). |
Forum: C++ Sep 9th, 2009 |
| Replies: 4 Views: 472 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 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 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 Return reference of logEvent object.
#include <string>
#include <sstream>
class logEvent
{
public:
logEvent(); |
Forum: C++ Aug 28th, 2009 |
| Replies: 2 Views: 354 >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 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 >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 An acute thread title. Does the thread title need a fixing. |
Forum: C++ Aug 18th, 2009 |
| Replies: 7 Views: 342 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 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 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 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 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 for (int i=0; getline(dict,words[i],'\n'); i++) {
..
} |
Forum: C++ Aug 10th, 2009 |
| Replies: 5 Views: 524 Download code from http://winprog.org/tutorial/ and compare it with your code. |
Forum: C++ Aug 10th, 2009 |
| Replies: 2 Views: 408 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 Views: 1,128 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 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 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 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 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 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 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 There is no doubt about it. It has to work. |
Forum: C++ Jul 22nd, 2009 |
| Replies: 23 Views: 965 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 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 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... |