15,300 Posted Topics

Member Avatar for agrawalashishku

Here is the output using VC++ 2008 Express on Vista. Is this the same as what you got? I'm sure the answers to your questions is how your compiler aligns data, on 1, 2, 4, 8 or 16 byte boundries. [quote] Here comes all the address listings: variable a: 26fe00 …

Member Avatar for Ancient Dragon
0
117
Member Avatar for kartouss

>>I am not getting the results Not supprised because you can't return the array like that because it will disappear as soon as the function returns. There are a couple of ways to solve that problem: 1) add a parameter and have the calling program pass the input buffer [code] …

Member Avatar for kartouss
0
238
Member Avatar for light_handle

>>Can anyone please tell me how to store contents of a text file after reading it into a 1D array buffer [code] char buf[1024]; // not read the file into the above array [/code] >>and then accessing each separate element of the paragraph C++ knows nothing about paragraphs -- only …

Member Avatar for Ancient Dragon
0
85
Member Avatar for sjcomp

you can export the entire class. I don't know if you can export boost library classes like this or not: [code] _dllspec(_dllexport) class A { // blabla }; [/code]

Member Avatar for Ancient Dragon
0
174
Member Avatar for kv79

>>Administrators , Moderators and all others who have a relationship have no right to answer . Ok -- stop me :) Don't know if they get any of the jobs or not since most people probably deal directly with the company offering the jobs rather then posting in DaniWeb.

Member Avatar for jbennet
0
149
Member Avatar for r30028

you probably trashed memory somewhere else before that line was executed. Most likely cause is writing beyone the bounds of a buffer, but there could be lots of other reasons too.

Member Avatar for Salem
0
74
Member Avatar for Roebuc
Member Avatar for Roebuc
0
99
Member Avatar for NinjaLink

>>centimeters = (inches_per_foot * 2.5400); To convert feet to centimeters feet * 30.48

Member Avatar for NinjaLink
0
137
Member Avatar for Black Magic

>>6 ^ 1 = 6X6? = 36 (IS THAT CORRECT??) No, that is not corrtect. 6 ^ 2 is 6 x 6. 6 ^ 1 = 6 you can use a calculator to verify the math

Member Avatar for Black Magic
0
231
Member Avatar for Alvin Phillips

Ohh did you catch the picture of Richard Simmons at the bottom :) :) He might seem a little wierd but got to give the guy a lot of credit for losing all that blubber. His before and after pictures are [URL="http://www.richardsimmons.com/j/"]here[/URL].

Member Avatar for sneekula
0
107
Member Avatar for VernonDozier

Unlike *nix you can install the source code anywhere you like. I downloaded mysql++-3.0.2.tar.gz and used WinZip to decompress it. In the uncompressed directory you will see volders for VC2003 and VC2005. Just fire up your compiler and select File --> Open --> Project Solution. Navigate to whereever you installed …

Member Avatar for VernonDozier
0
301
Member Avatar for BOTnPAID4

line 36 of your program: Please read [URL="http://www.daniweb.com/forums/thread90228.html"]this thread [/URL]how to flush the input stream because fflush() is only for output streams.

Member Avatar for Ancient Dragon
0
118
Member Avatar for vijayan121
Member Avatar for David Wang

What are you using for the gui program? OpenGL, DirectX, Direct Draw, QT, or something else? This is very very complex programming, so I hope you have a sound foundation in C and/or C++ programming because you will need it.

Member Avatar for Ancient Dragon
0
175
Member Avatar for Bridget23
Member Avatar for Seamus McCarthy

line 4: put all includes at the top of the file before anything else. It might compile the way you have it but its not the standard practice to put includes inside functions like that. As for your actual problem -- don't know.

Member Avatar for Seamus McCarthy
0
147
Member Avatar for zandiago

[QUOTE=zandiago;534739]AdditionallyBy the way, I'm using Vista (IE7).[/QUOTE] So do I and I have never seen (or at least noticed) that problem.

Member Avatar for Dani
0
456
Member Avatar for maysda19

do you know how to create a structure ? Not much to them [code] struct <struct name> { string name; int score; } [/code] Now just create an array of those things just like you did with the int array on line 37.

Member Avatar for Ancient Dragon
0
80
Member Avatar for doddware

One very common problem I had with porting from 6.0 was the use of loop counters, for example: [code] for(int i = 0; i < something; i++) // do something if( i == 0 ) // ok on VC++ 6.0 but not in C++ standards or VC++ 2005/8/9 [/code] MFC …

Member Avatar for doddware
0
134
Member Avatar for Ryuji5864

>>for (y = 0, x = 0; y <= i; y++) should be < operator, not <= because array values range from 0 to, but not including, i Also, initialize arrays with 0 when declared to insure they do not contain random data [icode]arr[50] = {0};[/icode] In that same function …

Member Avatar for Ancient Dragon
0
139
Member Avatar for ninjabreadman

By "product manager" do you mean you work for a company that makes widgets with integrated computer and software? Or do you mean you work for a software development house to write computer programs exclusively? I suspect if you want to work as a product manager for a software house …

Member Avatar for ninjabreadman
0
87
Member Avatar for anifeelings

Looks like the only thing you do not have is the default constructor. That is a constructor with no parameters.

Member Avatar for Nick Evan
0
218
Member Avatar for Glitch100

>>i have Visual Studio 2008 Which edition? the free Express edition can only do plain win32 api programs and console program. The program you are describing is a GUI with menus. Not all that difficult to achieve for someone familiar with win32 api programming. If you are not, then do …

Member Avatar for Ancient Dragon
0
129
Member Avatar for mikky05v

>>does anyone know what to do? Yes, don't you ? Use the [URL="http://www.cplusplus.com/reference/clibrary/cmath/cos.html"]cos() [/URL]function in math.h to calculate the cosignes of the numbers read from the data file. You first have to create the input file(s) probably using Notepad.exe or some other standard text editor from the operating system you …

Member Avatar for Ancient Dragon
0
98
Member Avatar for cpp_noobsauce

writing to file: why are you using C FILE and associated functions instead of c++ fstream? If you are going to write a c++ program then don't resort to C functions. It'll work but not very good practice or coding style. You need to pay attention to the warnings that …

Member Avatar for Ancient Dragon
0
116
Member Avatar for tm5054

>>cout << "Loan " << x << " For $" add 1 to x so you get 1, 2, ... [icode]cout << "Loan " << x+1 << " For $"[/icode] >>cout << "has a payment of $" << (double)loanAmount[x]/(double)numMonths[x] << " per month." << endl; To get the sum of …

Member Avatar for Ancient Dragon
0
100
Member Avatar for BBustos

>>The problem is it is displaying random numbers stored in the computer The problem is in the code you did NOT post -- show us the code that contains this line: [icode]DisplayEntry(data);[/icode] Most likely it is passing an instance of a structure that contains uninitialized data. When you declare the …

Member Avatar for Ancient Dragon
0
121
Member Avatar for buddha527

If you mean [URL="http://www.sosmath.com/matrix/matrix0/matrix0.html"]matrix algegra[/URL] then the two arrays have to be the same size. But lets say you have two arrays [code] int A[] = {1,2,3,4,5}; int B[] = {2,3,4,5,6}; [/code] then array C[0] = A[0] + B[0], and C[1] = A[1] + B[1], etc.

Member Avatar for vmanes
0
2K
Member Avatar for CodeBoy101

Threads are not natively supported by the c++ language but there are several api functions and libraries that you can use. One of them is win32 api function [URL="http://msdn2.microsoft.com/en-us/library/ms682453.aspx"]CreateThread()[/URL] Also see [URL="http://www.daniweb.com/forums/showthread.php?t=113820&highlight=CreateThread"]this thread[/URL] [edit]^^^ Tracey's example is excellent too.[/edit]

Member Avatar for CodeBoy101
0
189
Member Avatar for bschmitt78
Member Avatar for Ancient Dragon
0
198
Member Avatar for ar31an

First you will need an int array that contains the cumulative number of days in each month. For example: [icode]int days[] = {0, 31, 59, ... };[/icode] Next chop up the string into its individual int elements. Then determine if year is a leap year, if so then add one …

Member Avatar for hammerhead
0
107
Member Avatar for Mark515

already answered that in [URL="http://www.daniweb.com/forums/thread119624.html"]your other thread[/URL].

Member Avatar for Ancient Dragon
0
105
Member Avatar for Mark515
Member Avatar for kv79

Arnold was pregnant once -- I know because I saw his movie. [URL="http://www.imdb.com/title/tt0110216/"]Here's[/URL] proof. :) And [URL="http://ateros.com/pregnantmen/"]here's [/URL]more about pregnant men.

Member Avatar for steven woodman
0
143
Member Avatar for picass0

>>wat should i put in here also?) identical to main() [code]int abc(int argc, char* argv[]); int main(int argc, char *argv[]) { abc(argc, argv); } [/code]

Member Avatar for Ancient Dragon
0
73
Member Avatar for sahil_itprof

A pointer *p is not necessarily a pointer to an array. It could be a pointer to some object [code] void foo(int* p) { *p = 0; } int main() { int x; foo(&x); } [/code] or a pointer to an array of ints [code] void foo(int* p) { *p …

Member Avatar for Aia
0
182
Member Avatar for Ancient Dragon

Today I find that when I change a post code tags from [noparse] [code] blabla [/code] to this [code=cplusplus] blabla [/code] It doesn't work and acts as if something were misspelled or code tags were not present. But when I erase the [code] and retype the whole thing it works …

Member Avatar for Ancient Dragon
0
140
Member Avatar for Arne Kristoffer

lines 10-13: not needed. If you want a vector to start with a specific size then just call its resize() method line 42: [b]str[/b] is an empty string, so attempting to access anything beyone str[0] is an error.

Member Avatar for Ancient Dragon
0
865
Member Avatar for Jennifer84

Don't know what caused that error. My suggestion would be to uninstall that compiler (see Control Panel) then reinstall from Microsoft Website, unless you previously saved the download file on your computer.

Member Avatar for Colstel
0
625
Member Avatar for petzoldt01

>>My confusion is in myFunc1. What is happening? If you pass by value, exactly what value >> does Date dt contain (a pointer?)? Is Date d a local copy of Date dt? Yes. structures (classes) can be passed by value just like POD (plain-old-data) types. The ocmpiler makes a copy …

Member Avatar for Ancient Dragon
0
153
Member Avatar for aquariusdragon2

>>So I know how to delete a descriptor from an array, define [b]descriptor[/b]

Member Avatar for Ancient Dragon
0
105
Member Avatar for Ryano24

lines 10-15 are wrong. Here is how to declare that array of strings [code] char *sentences[] = { "String1", "String2", // etc etc }; [/code] and delete lines 19 - 32 because they are all wrong.

Member Avatar for jephthah
0
91
Member Avatar for cmoney12051

line 77: you can't call a constructor after instantiating the class objest (line 56). After that you must call the set functions. [code] students[i].setName(FirstName, LastName); students[i].setID(id); [/code] Make the score and point values part of the class so that you can easily match them up with the student.

Member Avatar for cmoney12051
0
97
Member Avatar for h0neydip

convert both dates to integer then all you have to compare is one simple integer. You can use the mktime() function in time.h to help you out. For example, 1 Jan 2008 is converted like this: [code] int main() { struct tm tm; time_t t1; memset(&tm,0,sizeof(struct tm)); tm.tm_mday = 1; …

Member Avatar for Ancient Dragon
0
372
Member Avatar for roverfind

[QUOTE=Ezzaral;586453]Trying to Find the imp in the system that has been Needlessly Capitalizing Words and stealing Punctuation Whats Up With You[/QUOTE] The [b]imp[/b] in the system was a filter that converted all uppercase posts to lower case with the first letter capital. After some discussion I think Dani has disabled …

Member Avatar for kv79
0
129
Member Avatar for black_adder

>>if you could write the code you would have my undying gratitude I will after you deposite $10,000.00 USD in my paypal account. DaniWeb is not a sofware whorehouse. We help, you write.

Member Avatar for Ancient Dragon
-2
91
Member Avatar for thuli babe
Re: miss

Glad to have you at DaniWeb. We need more ladies here. :)

Member Avatar for november_pooh
0
27
Member Avatar for Spagett912

lines 8 and 13 must have identical parameter types. Normall do not use cin in the set functions. Put all cin statements in the main() or whereever but not in the set functions. In the set functions just set the class variable to the parameter [code] void setName(string name) { …

Member Avatar for Ancient Dragon
0
89
Member Avatar for mikky05v

since the array is global it isn't necessary to pass it as a parameter. line 16: just make that a function call [icode]reading_data_into_array();[/icode] line 21: make that a void function because it isn't necessary to return anything and delete the parameter because the array is global.. line 24: you need …

Member Avatar for hammerhead
0
150
Member Avatar for gehher

I don't care much for wine, but I'll drink it if I have to :) I absolutely hate whiskeys and burbones. My favorite is Black Russians, vidka and gin. But, alas, I can't drink any of that any more ***sigh***

Member Avatar for lio04
0
306

The End.