15,300 Posted Topics

Member Avatar for makmak02

>>In my code I'm using the caret symbol for the square but it just multiply the number by 2 and not squaring it. Of course it doesn't work for you-- that isn't what the carret symbol does in c and c++. you have to use the * symbol and simply …

Member Avatar for Ancient Dragon
0
146
Member Avatar for winky

The prototype on line 4 is incorrect. Its not the same as the actual function you coded.

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

>>I'm ill and tired. My face is sweating - rest of me is shivering Hope you get over that cold soon -- I'm just now recovering from one. It'll probably be another month before I can get a flue shot. We're pretty big on flue shots over here. Here in …

Member Avatar for Ezzaral
1
182
Member Avatar for rocky1821

The loop beginning on line 8 will never ever execute more than once because of the return statements on lines 16 and 18. >>&& 2 == b - a ==> line 23 That will not work when the value of a > b. You need to consider someone entering 5 …

Member Avatar for Ancient Dragon
0
185
Member Avatar for cmoodc

>>anyone can help me Probably yes -- post your code and we'll see if someone can help figure out your problem

Member Avatar for Ancient Dragon
0
59
Member Avatar for DREAMER546

1. Delete line 15. 2. Delete the semicolon at the end of line 16 3. No need for variable [b]count[/b] so delete it on lines 6, 10 and 18. 4. initialize value of [b]number[/b] to 0 on line 5 because its used on line 11.

Member Avatar for DREAMER546
0
113
Member Avatar for lb10111

what is main.bin? I never heard of linking a *.bin file with *.o files. >> Since I can't use nasm to make binary files with EXTERN's And why not? Its the linker that resolves the externs, not the assembler.

Member Avatar for lb10111
0
1K
Member Avatar for thewizard397

[QUOTE=lasher511;418031]my favorite would have to be this one. [URL]http://youtube.com/watch?v=NSzsfadjaQo[/URL] But this one would be a close second. [URL]http://youtube.com/watch?v=STPFvrQEdXY[/URL][/QUOTE] The first one was pretty funny -- the second pretty boring; didn't watch all of it.

Member Avatar for zandiago
0
144
Member Avatar for asilter

>>why? where did you declare [b]hash[/b] ? I think it is probably declared in one of the boost libraries.

Member Avatar for vijayan121
0
361
Member Avatar for cmoodc

Huh? 1000000*1000000 is a number that is much larger than an integer can hold. Otherwise your question doesn' make much sense to me.

Member Avatar for cmoodc
0
89
Member Avatar for winky

>>if(a < b && c && d && e && f && g) Do you know what that statement does? It first checks if a < b, then if that is true it checks if c != 0, if that is also true it checks if d != 0, etc. …

Member Avatar for winky
0
108
Member Avatar for Dha_King

>>Hello sorry if i hijack this thread for my own purpose Please don't do it again. I split your thread this time for you for free :) Line 5 is incorrect. Arrays are numbered from 0 to, but not including, the value of N. You should use the < operator, …

Member Avatar for Ancient Dragon
0
512
Member Avatar for C++Amanda

>>Why doesn't it look good? Because why should I bother to answer here when you might already get answers elsewhere, and you might get conflicting answers at that.

Member Avatar for iamthwee
0
197
Member Avatar for The Dude
Member Avatar for npkinh

Just how does this relate to c++? It sounds like a question for [b]Web Development[/b] forum.

Member Avatar for Ancient Dragon
0
68
Member Avatar for maye13

I don't know why you are doing this the hard way with all those variables. All you need are three variables named Hours, Minutes and Seconds. To print them out with two digits each is like this: [code] printf("%02d:%02d:%02d\n", Hours, Minutes, Seconds); [/code] After getting keyboard input for the seconds …

Member Avatar for maye13
1
2K
Member Avatar for gaasha

If you replace ShellExecute() with CreateProcess() the caller process will get a handle and can then call WaitSigngleObject() to wait until the spawned process terminates.

Member Avatar for gaasha
0
89
Member Avatar for ocean001

ODBC doesn't work directly on wireless (embedded) devices running Microsoft Pocket PC or Mobile 5.0 operating systems. There is at least [URL="http://www.odysseycruises.com/index.cfm"]one commercial dll[/URL] that will allow mobile devices to send data back and forth to database, but it is quite costly. There is a free DLL from Microsoft that …

Member Avatar for ocean001
0
110
Member Avatar for kemboy

It uses recursion -- if you don't know what recursion is then you won't understand how the program works. Other than that, it is a poorly written program.

Member Avatar for Salem
0
93
Member Avatar for megan-smith

In a word processor when you hit the <Enter> key the cursor will move one line down and all the way to the left margin. That is what the '\n' character simulates in text files. When you load a text file that contains newlines in Notepad or some other word …

Member Avatar for megan-smith
0
136
Member Avatar for gator6688

you mean like this? [code=cplusplus] #include "stdafx.h" #include <iostream> #include <string> using namespace std; void enterData(string &todaysDate, string& firstName, string& lastName, double& amount); void printCheck(string &todaysDate, string& firstName, string& lastName, double& amount); int _tmain(int argc, _TCHAR* argv[]) { string todaysDate; string firstName; string lastName; double amount; enterData(todaysDate, firstName, lastName, amount); …

Member Avatar for gator6688
0
120
Member Avatar for nhenson

[URL="http://www.cplusplus.com/reference/iostream/istream/get.html"]The get() function [/URL]will get exactly the number of characters you specify unless it first encounters the '\n' in the file or end-of-file. Line 20 is asking for 14 characters and that's exactly what you'll get. In the example line you posted it will read "K G Johnson 45", which …

Member Avatar for Ancient Dragon
0
93
Member Avatar for pacman326@gmail

The loop at line 123 is incorrect. Should be coded like this because eof() doesn't work the way you think it does. [code] while(accountInfo >> accountNumber >> dOrC >> transaction) { accountNum[count] = accountNumber; dOrCArray[count] = dOrC; transactionAmount[count] = transaction; count++; } [/code]

Member Avatar for Ancient Dragon
0
103
Member Avatar for daniweb2013

[QUOTE=fzafarani;443243]Hi guys, i have one question, when i type using namespace std; at top of my program my compiler gives some error especially syntax error! my compiler is Borland C++ v.5 for example simple code: [/quote] When using the old headers with .h extension you don't use "using namespace std". …

Member Avatar for n.aggel
0
2K
Member Avatar for wicked357

lines 39 and 42 are wrong. The array only has 5 elements and you are attempting to access a 6th element -- won't work. And line 39 should use the loop counter variable like you did on line 30 and elsewhere.

Member Avatar for iamthwee
0
124
Member Avatar for revenge2

>>and what is "int" by the way. I am a little confused its a data type. Suggestion: read your text book occasionally.

Member Avatar for Ancient Dragon
0
165
Member Avatar for thyagarajan

use the functions in time.h. >> dont know how to store the time/date so that it can be compared with current date/time use the time_t (normally an unsigned int) that is returned by time() for that. initialize a time_t object when starting then get it again in another variable, then …

Member Avatar for Ancient Dragon
0
351
Member Avatar for gator6688

functions must be declared before they can be called. Your previous post contains the function prototype -- why did you delete it?

Member Avatar for Ancient Dragon
0
310
Member Avatar for gator6688

>>since it is an online class it is hard to get help Naw -- there's lots of help here at DaniWeb :) Appears you have declared variables firstName and lastName incorrectly -- should be declared as std::string instead of char. The way you have it those variables can only hold …

Member Avatar for Dave Sinkula
0
288
Member Avatar for The Dude

[QUOTE=EnderX;441671] Sorry, me no draw well. Me no have piggy to show. [URL="http://en.wikipedia.org/wiki/Spider-Ham"] [/URL][/QUOTE] and you no write english well either.

Member Avatar for hbk619
0
220
Member Avatar for zandiago

It only counts the number of vowls in the last line read. Move the closing brace at line 27 down to line 39 so that the program will count the number of vowles in every line. Also in line 34 is it not necessary to use [b]isalpha[/b] because checking for …

Member Avatar for zandiago
0
201
Member Avatar for zandiago

look at line 43 -- the condition is wrong because i is initialized to 0, so it will never be greater than 146. And why do you want that loop to print the same value for [b]numbers[/b] so many times? [b]numbers[/b] never changes value within that loop. [edit]line 34 is …

Member Avatar for zandiago
0
188
Member Avatar for scsi_016

use your compiler's debugger and step through the code. At the line where you get the assert error check variable values.

Member Avatar for scsi_016
0
96
Member Avatar for eranga262154

That appears to be only part of your program because [b]main()[/b] looks incomplete. >>That's true, it wont work. It will work if you use the correct flags. Add [b]std::ate[/b] as the second argument to the open function. Read [URL="http://www.cplusplus.com/reference/iostream/ofstream/open.html"]this[/URL] for more information >>Only one time write values No idea because …

Member Avatar for eranga262154
0
154
Member Avatar for zandiago

>>so considering the fact, that each line in the inFile contains all leters of the alphabeth, at some point or the other....i'd have to use a lot of if-else statements? For example... if (x>y)...all the way down? Naw -- it is not that hard. What jamthwee posted was just an …

Member Avatar for zandiago
0
275
Member Avatar for jaepi

you can write your own functions to replace them. ini configuration files are nothing more than simple text files that are in the format [code] [tag name] <field> = <value> [/code] So the program you write just searches for the tag name then the field and value.

Member Avatar for jaepi
0
179
Member Avatar for snoeflake

what compiler and what os? Never heard of a horizontal chart. Looks something like this: [code] 4 | 3 | 2 | 1 | 0 __________________________________ 1 2 3 4 5 6 7 [/code] You could use something called [URL="http://www.math.sunysb.edu/~scott/Book331/Plotting_with_Maple.html"]Maple[/URL]

Member Avatar for snoeflake
0
128
Member Avatar for annagraphicart

And after writing the output to a file call system() (or some other similar os-specific function) to launch Notepad, for example [code] system("Notepad myfile.txt"); [/code]

Member Avatar for Ancient Dragon
0
91
Member Avatar for de_ghost

>> i don't know is it correct Compile and test it and find out if its correct or not. 1. There is no need for the second and third parameters to that function and possibly not even the first parameter. You can make all those parameters local to that function …

Member Avatar for Ancient Dragon
0
126
Member Avatar for mattarov

First, you need to make variable [b]pass[/b] one byte larger so that is can contain the normall c string null terminator. Then lines 7-13 can be simplified like this [code] char pass[] = "pasqwe"; [/code] Notice you don't have to specify the size of the array when initializing it with …

Member Avatar for Salem
0
83
Member Avatar for vimalfor5

>>different acount types like checking, savings, loans, mortgages, certificates, etc ? >>how to connect the different account types to the user You have that backwards -- connect users to account types. Each user has one or more account types, for example I have a checking account and a savings account. …

Member Avatar for vimalfor5
0
177
Member Avatar for annagraphicart

Yes, but its more complex than you can handle right now. Just concentrate on writing the output to a simple text file.

Member Avatar for annagraphicart
0
137
Member Avatar for n.aggel

If this is for a school assignment then you probably should not use the boost library without your instructor's prior permission because he (or she) may not be able to compile it on school computers.

Member Avatar for n.aggel
0
418
Member Avatar for teppuus

Does the id array sort properly ? If not then you need to rethink the algorithm. Get that array sorted correctly first then you can add the code to swap the other array at the same time the id array elements are swapped. If you need a selection sort algorithm …

Member Avatar for teppuus
0
235
Member Avatar for Duki

you are using integers, so the program drops all fractions. [b]percentFigure / 100 [/b] is 0 for all values of percentFigure less than 100. Change data types to float and it will work as you expected.

Member Avatar for Ancient Dragon
0
205
Member Avatar for purifier

[QUOTE=cscgal;439440]Maybe he just is a bad lawyer? It's been my experience that people get jobs outside of their degrees either because they fell in love with an industry too late (i.e. after school) or because they aren't good enough to make it in what they have a degree in. [/QUOTE] …

Member Avatar for Ancient Dragon
0
165
Member Avatar for annagraphicart

>>Then.. How would I do a sort in a parallel array? You are headed in the right direction, just need to learn how to access each element of the array. Array elements are numberd from 0 to the size of the array, in your program the array [b]score[/b] has three …

Member Avatar for Ancient Dragon
0
172
Member Avatar for annagraphicart

you will have to allocate the array using the new operator, something like this: [code] int* scores = 0; // an unallocated array int nItems = 0; // number of items user will enter to set size of array cout << "enter array size"; cin >> nItems; // now allocate …

Member Avatar for Ancient Dragon
0
80
Member Avatar for apontutul
Member Avatar for JBI_UK

If you have the source code then why can't you edit it? Should be simple plain-old text files just like the soruce for any other program.

Member Avatar for Salem
0
88

The End.