15,300 Posted Topics

Member Avatar for robase

>I don't know how to put the ATM into my program neither do we if you don't post the rest of the program. Zip up all the source file and header files (bank.h and account.h) and attach them to your post. also tell us what compiler and operating system you …

Member Avatar for Ancient Dragon
0
150
Member Avatar for Ancient Dragon

Whenever (or most of the time) I hit the bookmark to come to this site I get a File Not Found error from your server -- I know its your sever because it has a DaniWeb banner across the top. Click the bookmark again and everything works normally. This is …

Member Avatar for Dani
0
74
Member Avatar for prof.thakur

google for "splash screens". [URL=http://www.codeproject.com/dialog/dialogspl.asp]Here[/URL] is how to do it for MFC program.

Member Avatar for Ancient Dragon
0
161
Member Avatar for grunge man

there is a lot of answers on the web if you would use [URL=http://www.google.com/search?hl=en&q=how+to+convert+binary+to+decimal+in+c&btnG=Google+Search]Google[/URL] Look [URL=http://irc.essex.ac.uk/www.iota-six.co.uk/c/e2_binary_numbers.asp] here[/URL] for one of them.

Member Avatar for iamthwee
0
365
Member Avatar for grunge man

you need to include iostream [code] #include <iostream> // rest of program here [/code]

Member Avatar for grunge man
0
363
Member Avatar for tayspen
Member Avatar for Dani
0
114
Member Avatar for Niklas

do you mean something like [URL=http://www.macrovision.com/products/flexnet_installshield/index.shtml]Install Shield[/URL] ? If you wrote the programs yourself, then there is probably few if any limitations as to what you can distribute. But you may have to also install other DLLs or shared libraries that your program(s) depend on. For those you have to …

Member Avatar for Niklas
0
194
Member Avatar for amen

I think there there is a *nix shell conmmand that will do it (tee ??) but not in MS-Windows. you might put the output lines into a function then call it twice [code] void foo(ofstream& out) { out << "Hello World " << endl; } int main() { ofstream out("file.txt"); …

Member Avatar for Narue
0
117
Member Avatar for degamer106

>> if its a character array then initialize it with '\0' and if its an integer array then initilize it with 0 I'm not about to revive that old thread you linked, so I'll do it here because I just can't resist the urge :twisted: . In the above, '\0' …

Member Avatar for Salem
0
356
Member Avatar for Kashif

>>first i am using tc3 compiler That's mistake #1. Trash it and use something more modern, such as Dev-C++ from [url]www.bloodshed.net[/url] >>which gives error for cstdlib your compiler is too ancient. See above

Member Avatar for Ancient Dragon
0
217
Member Avatar for rontab68

Yes. After using ClassWizard to generate all the variable names, such as m_m1 through m_m10, then create your own int array and replace all those variables with your array You will need to delete (or comment out) the m_m1 ... varaibel in the .h file and in the .cpp file. …

Member Avatar for rontab68
0
107
Member Avatar for grunge man

>>"in simpelist programing" :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: :mrgreen: I really have no idea how to do it either, but I know it is not simple and requires advanced c/c++ skills and a GUI platform, such as MS-Windows or *nix Motief (or something similar). There are several compilers that will …

Member Avatar for Ene Uran
0
108
Member Avatar for ultirian

Portability depends on the program you wrote. If you use any MS-Windows functions at all then you will have porting problems. If however you used ansi standard C and C++ then you will have few porting problems. And most *nix systems come with gnu gcc and g++ compilers installed, which …

Member Avatar for ultirian
0
153
Member Avatar for ianrosengren

[QUOTE=ianrosengren] May it help?[/QUOTE] Possibly -- if you would post a link to it so that people can test it.

Member Avatar for ianrosengren
0
101
Member Avatar for Kashif

its not nice to post the same question in two different threads. you will probably get mixed results and possibly conflicting answers. The answer I posted at the bottom of your other thread should work with your compiler. you will have to use [code] sprintf(...) [/code] Narue gave you an …

Member Avatar for Kashif
0
109
Member Avatar for marioxp

1. Main problem is that you also need to define operator=. 2. you can simplify other parts. ' 3. You need better formatting style. to make the code easier to read. [code] #include "stdafx.h" #include <iostream> #include <string> using namespace std ; class twodimfield { public: size_t sizeP; string itsmali; …

Member Avatar for Ancient Dragon
0
94
Member Avatar for meenu

c++ can be used for anything -- nearly all the programs that run on your computer were written in either c or c++, even the operating system. Unix os was originally written in c. I think most (if not all) games are written in either c or c++.

Member Avatar for gampalu
0
158
Member Avatar for Moe

.h files are includes in .c files [code] // myfile.c // #include "myheader.h" // rest of c program here [/code] Then run your compiler against all the *.c files. It will create *.obj files which can be used by the linker to create the executable file. Beyone that, how to …

Member Avatar for WolfPack
0
2K
Member Avatar for p3nguin

>>the purpose was to pass one set through pointers and the rest arrays yes it is silly -- arrays are always passed as pointers. The below are both identical and interchangable. The problem with both of these is that they are both arrays of unspecified size. And the first one …

Member Avatar for Ancient Dragon
0
121
Member Avatar for Lerner

[code] struct Move { Vertex orig; Vertex dest; friend istream & operator >> (istream & is, Move & m); }; istream & operator >> (istream & is, Move & m) { is >> m.orig; is >> m.dest; return is; } [/code]

Member Avatar for Narue
0
135
Member Avatar for rc_ashish

If you mean you want to change front at a laser printer attached directly to your computer or on a network -- that is a pretty complex topic all in itself. There are several c++ classes that can make it somewhat easier, and all require more advanced knowledge of c++. …

Member Avatar for WolfPack
0
284
Member Avatar for joyjit
Member Avatar for Ancient Dragon
0
182
Member Avatar for hari12341

I can't really help much without seeing most of the code, but below won't work with filenames that contain spaces. and hopefully fname is defined to be max size for your operating system so that it can contain full path to the file. Id suggest you use std::string for the …

Member Avatar for Ancient Dragon
0
172
Member Avatar for pdhaz

graphics is an advanced programming topic that you are obviously not yet ready to tackle. Learn the language and in about 6 months or so you MIGHT be ready. And it depends on the compiler and operating system you are using. Why do you need tutorials? most text books cover …

Member Avatar for WolfPack
0
127
Member Avatar for Podge

>> helping me understand Visual C++ 2005 better I have problems with that compiler too and I've been programming for over 25 years! My opinion -- it is not a very good compiler for beginners to learn programming because it takes a lot of time just to learn how the …

Member Avatar for Podge
1
202
Member Avatar for srishekh

>>when new is unable to allocate the specified memory it will return NULL No it doesn't. c++ standards say that new throws an exception when there isn't enough memory, although [URL=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_pluslang_the_new_and_delete_operators.asp]Microsoft compilers[/URL] may still return NULL as well. There may be better ways to code this exception handling routine, but …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for DashM

I don't see any code that actually enlarges the 2d matrix. it just copies data from one array to another then back to the original again. how is myGrid defined? Is it dynamically or statically allocated? You need to post a bit more code that shows these details.

Member Avatar for AstroNox
0
100
Member Avatar for Yustme

>> int answer = ( (*a) * (*b) ); what is the intent of ^^^ that line? variables a and b are used before they are initialized and will surely cause your program to crash. Just simply code it like this: [code] int answer; [/code] >> a = &x[11]; that …

Member Avatar for Yustme
0
136
Member Avatar for benyam_dessu

[URL=http://www.bloodshed.net/c/index.html]here[/URL] is a few free source files -- browse around that site and you might find additional help. Otherwise its just a c and c++ compiler that compiles normal programs. Browse around your compiler's menues and test out some of its options. That's the best way to learn it. Start …

Member Avatar for benyam_dessu
0
83
Member Avatar for DotNetUser

If MC is a C or C++ compiler, you have to put a number inside those brackets to tell it how big that array is going to bel Record ListOfRecords[100]; You don't need another pointer in order to pass it to another function. [code] // use only ONE of the …

Member Avatar for Ancient Dragon
0
124
Member Avatar for degamer106

If you posted the entire function then what you did is probably as simple as any. you could use a switch statement, but it doen't shorten or reduce your program and might actually increase the bulk of the program. [code] switch(ch) { case 'a': ++array[0]; break; ... } [/code] If …

Member Avatar for degamer106
0
91
Member Avatar for jack223
Member Avatar for babyjoan

You need to pay more attention to semicolons and placement of braces. There are other problems than I identified below, but fix these first. #include <iostream> #include <iomanip.h> const int size = 100; void generate (float x[][size], int n, float&xij) { for (int i=0; i<n; i++) { for (int j=0; …

Member Avatar for Ancient Dragon
0
112
Member Avatar for amen

The insertion operator >> stops at the first space. use getline() to get a whole sentence. [code] getline(cin,word); [/code]

Member Avatar for Narue
0
150
Member Avatar for Duke_0064
Re: C++

>> Does anyone have any suggestions as to how I could better this code. Yes -- use code tags. Your code is too hard to read to make any useful comments.

Member Avatar for Ancient Dragon
0
148
Member Avatar for srishekh

[QUOTE=srishekh]could u tell me the problems in defining a 3D double array. that is double a[1000][1000][1000];[/QUOTE] Why do new programmers think their computers have an infinite amount of memory? That array takes 8,000,000,000 or about 8 Gig of RAM! Redesign your program or use a file.

Member Avatar for andor
0
64
Member Avatar for musicmancanora4
Re: gcc

now what the he!! kind of question is that? Do you say this to your auto mechanic [b]My car is broke, will you fix it[/b] :evil:

Member Avatar for Ancient Dragon
0
90
Member Avatar for musicmancanora4

What compiler are you using? your program contains a whole bunch of errors that your compiler should have complained about. You have to fix up those problems before you can run the program. Just because the compiler may have produced an executable program doesn't mean that program will run, especially …

Member Avatar for Ancient Dragon
0
96
Member Avatar for mwo0002

which line is in bold ? they all look bold to me. how about adding some comments that point to the line [code] ... [color=red]<<< this line is the error [/color] [/code] I think its better to use code tags when posting code, not php tags.

Member Avatar for mwo0002
0
307
Member Avatar for cczak

>>Please Help Me with my c++ homework Tanslated: Please do my homework because I'm just too busy (or lazy) to do it myself.

Member Avatar for Bench
0
170
Member Avatar for nthompkins

>>Please help!!! Please help do what?? do you want us to do your assignment (homework)? something you don't understand about it?

Member Avatar for nthompkins
0
186
Member Avatar for perlsu

why are you using memcpy()? use strcpy() and you won't have to worry about null-terminating the string. [code] void main() { const char sendText[] = "Hi"; buffersize = strlen( sendText ); buffer = (unsigned char*)malloc( buffersize + 1 ); strcpy( buffer, sendText); } [/code] >>'=' : 'unsigned char ' differs …

Member Avatar for Narue
0
398
Member Avatar for Vagabond

have you tried this? I guess you already know that you will have to allocate memory for that buffer before using it -- yes?? [code] char* DisplayBuffer; [/code]

Member Avatar for Ancient Dragon
0
134
Member Avatar for tayspen

I agree that a delete button would be useful -- I have occationally posted bad information and the only way to delete it was to edit the post and remove all the code, leaving a post with an empty message.

Member Avatar for anupam_smart
0
291
Member Avatar for mccbebz

>> char names[10]; >>scanf("%s",n);} the above is incorrect. 1. you need and array of 10 strings. What you posted is one array of 10 characters. you have to pass a character array, not an integer [code] [color=red]char names[10][10];[/color] for(n=0;n<10;n++){ scanf("%s",[color=red]names[n][/color]);} } [/code] One major problem with scanf() is that you …

Member Avatar for Ancient Dragon
0
104
Member Avatar for tyczj

Just use [URL=http://www.euclideanspace.com/maths/algebra/matrix/arithmetic/index.htm]google[/URL] Use loops to iterate through each dimension of the matrices. Doing other matrix math is about as simple as below. Note: I didn't compile or test this code. [code] // add 2 matrices int array1[2][2] = {{1,2},{2,3}}; int array2[2][2] = {{3,4},{4,5}}; int array3[2][2]; for(int i = 0; …

Member Avatar for tyczj
0
140
Member Avatar for That Man

Don't get too overwhelmed -- this is just a simple console program. Begin with the simplest program you can think of then gradually add more code to make it do what the requirements state. Don't attempt to implement everything all at one time. Here are a couple hints: [b]select from …

Member Avatar for shaikh_mshariq
0
406
Member Avatar for supes32

linked lists can be pretty confusion topic. you might want to study about them in more depth. Read one or more of the many [URL=http://www.google.com/search?hl=en&q=c+linked+list+tutorial&btnG=Google+Search]tutorials[/URL] you will find. Your text book should also have a chapter or two about them.

Member Avatar for iamthwee
0
210
Member Avatar for gampalu

[QUOTE=gampalu]Hi! I'm new in C++, but perhaps this is a general problem, not C++ exclusive. This is printed in my console, "-1.#IND", when using a printf, when this occurs? thanks[/QUOTE] might be that you passed printf() an uninitialized variable, but since I forgot my crystle ball today nor am I …

Member Avatar for Narue
0
248
Member Avatar for Arvinth

>>file handling is one way I cannot go abt doing this The only other way I know of is to redirect the input and output on the command line. [code] c:> myprogram < infile.in > outfile.out [/code] That will redirect the file's contents to stdin just as if you typed …

Member Avatar for Arvinth
0
323

The End.