Forum: C++ 3 Days Ago |
| Replies: 6 Views: 202 >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++ 3 Days Ago |
| Replies: 7 Views: 227 The identifier of an array "color" is equivalent to the address of its first element and an array "color" can be considered a constant pointer.
So we cannot assign value to the constant,
... |
Forum: C++ 7 Days Ago |
| Replies: 1 Views: 130 >how to print address of a non static member functions
Take a look at this thread - http://www.gamedev.net/community/forums/topic.asp?topic_id=268274 |
Forum: C++ 9 Days Ago |
| Replies: 1 Views: 120 Welcome sara_2,
We only give help to those who show effort. You might want to read the homework (http://www.daniweb.com/forums/announcement58-2.html) policy and member rules... |
Forum: C++ 9 Days Ago |
| Replies: 7 Views: 271 You need to indent your code. You cannot possibly expect us to read that unreadable code mess!
Encase your code in:
and
tags. |
Forum: C++ 9 Days Ago |
| Replies: 1 Views: 153 >Is there a way to determine the largest amount of continuous memory using either new or malloc?
No. You can't call malloc to get how many bytes are available for you to use. |
Forum: C++ 16 Days Ago |
| Replies: 1 Views: 159 Welcome,
You might want to read the homework (http://www.daniweb.com/forums/announcement58-2.html) policy if you run into problems and want to ask for help here. |
Forum: C++ 22 Days Ago |
| Replies: 7 Views: 291 Thanks Narue.
I really appreciate your help. I apologize for the inconvenience. |
Forum: C++ 22 Days Ago |
| Replies: 7 Views: 291 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++ 22 Days Ago |
| Replies: 1 Views: 235 Take a look at this article - http://www.codeproject.com/KB/miscctrl/mschartvc.aspx |
Forum: C++ 25 Days Ago |
| Replies: 2 Views: 366 Writing your object to disk only saves the pointers, which is useless. You need a much more complex file format that will let you write and read each item within the vectors. Please read an article... |
Forum: C++ 25 Days Ago |
| Replies: 5 Views: 263 Welcome to the daniweb. Read the sticky thread - ReadMe (http://www.daniweb.com/forums/thread70096.html) |
Forum: C++ 28 Days Ago |
| Replies: 11 Views: 705 Every recursive (http://en.wikipedia.org/wiki/Recursion_(computer_science)) function can be transformed into an iterative function by using a stack.
void inverted(int a)
{
if (a!=-1)
{... |
Forum: C++ 28 Days Ago |
| Replies: 2 Views: 271 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++ 30 Days Ago |
| Replies: 4 Views: 207 Try it,
.....
case 'I':
case 'i':
if(roman.at(i+1)=='V' || roman.at(i+1)=='X')
decimal-=1;
else
decimal... |
Forum: C++ 30 Days Ago |
| Replies: 1 Views: 203 Take a look at this thread - http://www.daniweb.com/forums/thread183072.html |
Forum: C++ 30 Days Ago |
| Replies: 5 Views: 334 Take a look at this thread - http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/97e55815-d73c-48c3-9a60-1ca617218bd2 |
Forum: C++ 31 Days Ago |
| Replies: 3 Views: 597 As the error says, the name getch() is deprecated, and _getch() (http://msdn.microsoft.com/en-us/library/ms235446(VS.80).aspx) is recommended instead. |
Forum: C++ Nov 13th, 2009 |
| Replies: 5 Views: 502 You can't use % operator with floating point values. Use http://www.cprogramming.com/fod/fmod.html. |
Forum: C++ Nov 13th, 2009 |
| Replies: 2 Views: 224 Create a library with reusable functions & classes. They can be linked with different applications. It saves a lot of time and encourages reuse.
Take a look at aricle -... |
Forum: C++ Nov 13th, 2009 |
| Replies: 2 Views: 312 >when the file dreams.text is created it should be in the same folder where this code and exe is saved.
Not necessary. Use absolute path.
fstream* file = new fstream("c:\\dreams.txt",... |
Forum: C++ Nov 13th, 2009 |
| Replies: 1 Views: 178 Welcome,
You should have to use getWindowRect method.
CRect rect;
CPoint point;
wnd->getWindowRect(rect);
point.x=rect.Width()/2; |
Forum: C++ Nov 9th, 2009 |
| Replies: 2 Views: 242 Read this page - http://dev.mysql.com/doc/refman/5.1/en/connector-cpp.html
SUMMARY: For windows platform, MySQL Connector/C++ supports only Microsoft Visual Studio 2003 and above on Windows. |
Forum: C++ Nov 7th, 2009 |
| Replies: 4 Views: 442 Purchase a good book. I suggest Network Programming for Microsoft Windows (http://www.amazon.com/Network-Programming-Microsoft-Windows-Professional/dp/0735605602) by Anthony Jones. It is a good book. |
Forum: C++ Nov 6th, 2009 |
| Replies: 4 Views: 220 I hope you will find some useful information about to open a file from this link - http://www.cplusplus.com/doc/tutorial/files/. |
Forum: C++ Nov 5th, 2009 |
| Replies: 4 Views: 220 Modify your code with,
if(!InputFile)
{
cout << "Error!";
return 0;
}
What happen if value count exceed 50? |
Forum: C++ Oct 25th, 2009 |
| Replies: 1 Views: 119 Here are tutorials.
1. http://vcplusplustutorials.ktsinfotech.com/
2. http://msdn.microsoft.com/en-us/visualc/default.aspx |
Forum: C++ Oct 25th, 2009 |
| Replies: 1 Views: 432 Please read this rule - We only give homework help to those who show effort. (http://www.daniweb.com/forums/announcement61-2.html) |
Forum: C++ Oct 9th, 2009 |
| Replies: 1 Views: 234 Read the pages of online book - Secure programming cookbook for C and C++ ... |
Forum: C++ Oct 9th, 2009 |
| Replies: 2 Views: 299 Turbo C++, Visual C++ are C++ compilers (http://en.wikipedia.org/wiki/List_of_compilers).
I think you will get more ideas from this article - http://en.wikipedia.org/wiki/Substitution_cipher. |
Forum: C++ Oct 8th, 2009 |
| Replies: 1 Views: 240 Close the current file and reopen it or use seekg (http://www.cplusplus.com/reference/iostream/istream/seekg/) method. |
Forum: C++ Oct 8th, 2009 |
| Replies: 1 Views: 201 Use fmod (http://www.cplusplus.com/reference/clibrary/cmath/fmod/) - (<cmath> header file).
....
lon=fmod(lon1-dlon +pi,2*pi )-pi;
... |
Forum: C++ Oct 8th, 2009 |
| Replies: 1 Views: 521 Take a look at this FAQ - http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/83c31ac8-4946-49be-8a34-c7a7592fb906/ |
Forum: C++ Oct 8th, 2009 |
| Replies: 4 Views: 222 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 8th, 2009 |
| Replies: 2 Views: 223 @gretty: I have never seen this before class Y : public X. What does that mean?
Reusability is important feature of object-oriented programming. C++ strongly supports the concept of reusability.... |
Forum: C++ Oct 4th, 2009 |
| Replies: 8 Views: 295 int stringClass::wordCount(string line)
int stringClass::wordCount(string line){
cout << "\nThe String you entered in is: " << strArray << endl;
charAmount = strlen(strArray);
cout <<... |
Forum: C++ Oct 4th, 2009 |
| Replies: 8 Views: 295 Missing typename of argument in method definition,
int stringClass::wordCount(string line){
.....
//(n+1) = total; // <---------------Remove this
....
} |
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++ Oct 4th, 2009 |
| Replies: 1 Views: 209 Urgent! There are two ways:
1. iostream reference (http://www.cplusplus.com/reference/iostream/iostream/)
2. template reference (http://www.parashift.com/c++-faq-lite/templates.html) |
Forum: C++ Oct 4th, 2009 |
| Replies: 2 Views: 242 My suggestion and favorite are,
Effective C++ (http://www.amazon.com/Effective-Specific-Addison-Wesley-Professional-Computing/dp/0321334876/ref=pd_bxgy_b_img_b)
The C++ Programming Language... |