15,300 Posted Topics

Member Avatar for ITprincess

>>The starting address of any element in the account array can then be calculated as the address of the first record in the array + (account number - 1000) * sizeof(int). Are you certain about that statement ? That would imply that all those account number integers are contained in …

Member Avatar for Ancient Dragon
0
117
Member Avatar for Ancient Dragon

I hope everyone has a great newyear's party tonight. I just got a glimpse on TV of the New Year fireworks display that Austrilia put on. Wow! It was a glorious display. We usually have similar displays all over the USA. When I was a kid in 1950s we used …

Member Avatar for sneekula
0
205
Member Avatar for jaasaria

>>cant detect well the problem.. Neither can we since we can't see your computer's monitor and code.

Member Avatar for jaasaria
0
101
Member Avatar for hschitte

[URL="http://www.tech-archive.net/Archive/VisualStudio/microsoft.public.vsnet.debugging/2008-01/msg00009.html"]Here [/URL]is some info that may be helpful to you

Member Avatar for Ancient Dragon
0
43
Member Avatar for shaikh_mshariq

you could do a remote login on the remote computer, assuming you have a user name and password on that machine. I've seen this done by network administrators at my old office, but I don't know exactly how they did it. I suppose another way is to use PCAnywhere by …

Member Avatar for shaikh_mshariq
0
274
Member Avatar for ingeborgdot@yah

With the MSDN subscription you gets 40-50 DVDs (or so) that contain every operating system Microsoft has ever released and in every language (English, German, etc) as well as C++ compilers, device drivers, DDK, Windows SDK and searchable documentation for all win32 api functions.

Member Avatar for jbennet
0
437
Member Avatar for dbwalters

>>error C2679: binary '>>' : no operator found which takes a right-hand operand of type >>'std::string' (or there is no acceptable conversion) you forgot to include <string> line 30 of the code you posted: the iterator [b]iter[/b] has never been set to anything, so that loop won't work right.

Member Avatar for dbwalters
0
107
Member Avatar for snowy_shoryu

Welcome to DaniWeb -- I hope you read the RULES which state we do not do your homework for you. Show us what you know how to do and we'll help with the rest

Member Avatar for Ancient Dragon
0
304
Member Avatar for tootypegs

Neither of those functions will be useful to you. This is a c++ program, right? Then just use std::string's find() method after reading a line from the file [URL="http://www.cppreference.com/cppstring/index.html"]Here [/URL]is a complet list of std::string methods. [code] #include <string> #include <fstream> using namespace std; int main() { string line = …

Member Avatar for Ancient Dragon
0
91
Member Avatar for gcardonav

add [icode]cin.ignore()[/icode] just before the return statement to make it stop until you press a key.

Member Avatar for Duoas
0
201
Member Avatar for mikeandike22

line 13: If that is executed the next line should be exit(1) to prevent further program processing. No point continuing when the input file doesn't exist. lines 26 and 40: delete both these, only one is needed. See the while loop I posted below for correction. linet 25: don't use …

Member Avatar for Ancient Dragon
0
209
Member Avatar for Dave Sinkula

>>complete abolishment of religion in government Yes, I agree with that. There should be a wall between government and religion -- one should not cross the boundries of the other. The government should stay out of the church's business and the church should stay out of politics. Times have changed …

Member Avatar for sneekula
0
553
Member Avatar for darkprogrammer

goto [url]www.amazon.com[/url] and search for "Visual Studio 2008" in the books selection. They have several of them with reader reviews too. If there are any graphics books they will have them too.

Member Avatar for Salem
0
108
Member Avatar for missileh

by WMI I assume you mean [URL="http://www.microsoft.com/whdc/system/pnppwr/wmi/default.mspx"]this[/URL] ? Read the article and it will tell you what you need.

Member Avatar for Ancient Dragon
0
83
Member Avatar for Rehamsk
Member Avatar for loushou

The functions you call are probably attempting to access that memory location because of bad arguments you send it. Check the value of pointers such as [b]p_dx_Device[/b] to make sure they are valid and the value of the parameters sent to make sure they are correct. for example what is …

Member Avatar for loushou
0
560
Member Avatar for Jx_Man

I think you get a couple rep points for every 1,000 posts. As far as I know there are no rep points based on length of membership. Post frequently in the technical forums and your rep points will probably go up faster.

Member Avatar for Ancient Dragon
0
350
Member Avatar for tamereth

[QUOTE=tamereth;520100]My program works properly under windows, however, it seg faults when I try to compile/run it under linux. [/QUOTE] So, how did you get the executable program when there were compile erorrs? No respectable compiler produces the executable under that condition. Do you not look at the messages your compiler …

Member Avatar for tamereth
0
178
Member Avatar for melliniumman

You can boot from any bootable drive -- master, slave, CD, or DVD, and in some cases even the A and B floppy drives. But the first hard drive installed is always the master driver. All other non-removable hard drives are slave drives. You might damage your computer if you …

Member Avatar for Ancient Dragon
0
77
Member Avatar for majestic0110

[QUOTE=twomers;519216]House.[/QUOTE] House isn't a sitcom. My varorite sitcom from UK is Ivory Towers, although Red Dwarf was very good too. From USA is I Love Lucy and The Jeffersons. I don't like any of the current ones.

Member Avatar for twomers
0
46
Member Avatar for Villanmac

line 24: Performance can be improved as shown below. The outer loop goes from 0 to number-of-elsmenets -1, its not necessary to look at the last item. The inner loop starts at i+1 and continues to the number of elements. [code] for(int i = 0; i < 9; ++i) { …

Member Avatar for Ancient Dragon
0
256
Member Avatar for kamathmahendra

[b]name[/b] is just a single character. What you want is a character array. [icode]char name[255];[/icode]

Member Avatar for Aia
0
220
Member Avatar for Master000

>>We don't do it for you. Period. Not so fast Nurue. I'll do it is the op first deposits $10,000 USD into my PayPal account. But then this thread will have to be moved to the Job Offers board. :)

Member Avatar for Ancient Dragon
0
79
Member Avatar for eesti44

The other file you need to write is the *.cpp file that implements the functions in that class, and main() which all standard C and C++ programs have to have. When you created that Dev-C++ project it already created the main.cpp and main() function shell. So now all you have …

Member Avatar for Agni
0
217
Member Avatar for jimmy.rocks1

The default to open() is to truncate the existing file and start anew. To append to the file add the ios::app flag. [icode]myfile.open ("example2.txt", ios::app);[/icode] [URL="http://www.cplusplus.com/reference/iostream/fstream/open.html"]Read this [/URL]for a complete list of the flags you can use in open()

Member Avatar for vijayan121
0
108
Member Avatar for shaikh_mshariq

Several ways to achieve that. Read [URL="http://www.alexfedotov.com/articles/enumproc.asp"]this article[/URL]

Member Avatar for shaikh_mshariq
0
104
Member Avatar for tateng

do mean VC++ 2008 Express? All C++ compilers support command-line interfaces, its part of the c++ ISO standards. [icode]int main(int argc, char* argv[])[/icode] In the above line, [b]argc[/b] is the number of command-line arguments and [b]argv[/b] is an array of the arguments.

Member Avatar for Ancient Dragon
0
131
Member Avatar for koculan

It is easier to use std::stringstream class to do that [code] #include <sstream> <other includes here> ... string sentence = "Once upon a time there were three little pigs"; string word; vector<string> array; stringstream stream(sentence); while( stream >> word) { array.push_back(word); } [/code]

Member Avatar for Ancient Dragon
0
149
Member Avatar for prabhat.singh

see these [URL="http://www.google.com/search?hl=en&q=winsock+tutorial"]winsock tutorials[/URL]. MFC has a socket class, but it sucks pretty badly. Better to just use winsock functions directly.

Member Avatar for Ancient Dragon
0
38
Member Avatar for programmingnoob

what's the significance of those delay functions? What is P1 because it isn't defined anywhere in the code you posted. for case G: [code] int a1 = 0x01; for(int i = 0; i < 8; i++) { P1 = a1; a1 <<= 1; delay(); } [/code] or you could create …

Member Avatar for WaltP
0
185
Member Avatar for chloevin

If you don't know how to start the project then you are not ready to write something as difficult as a chat program. There are lots of [URL="http://www.google.com/search?hl=en&q=vb6+tutorial"]VB tutorials[/URL] -- start there.

Member Avatar for technogeek_42
0
294
Member Avatar for superjacent

I think the problem is line 21 of the header file -- you have to have a semicolon at the end of the class. Put a semicolon after that closing brace.

Member Avatar for superjacent
0
190
Member Avatar for nurulshidanoni

[quote]1 001 002 003 2 005 009 004 [/quote] If you look at the data you will see that the student id is just a single character, but grades are all 3 digits left-padded with 0s. So if you read the file in as words (strings) instead of integers you …

Member Avatar for nurulshidanoni
0
793
Member Avatar for CodyOebel

You might read [URL="http://support.microsoft.com/kb/161088"]this[/URL], especially the comments at the end of the window about [b]SendMessage[/b] command-line function. I don't have Outlook on my computer so I can't test it.

Member Avatar for Ancient Dragon
0
99
Member Avatar for CodyOebel

If you use std::string and std::ifstream, then you can loop through the file using getline(). Store each string in a std::vector array. The code is very simple, like this: If you only want certain line numbers then just count them inside the loop. [code=c++] #include <vector> #include <fstream> #include <string> …

Member Avatar for CodyOebel
0
102
Member Avatar for darklich13

Duoas already told you how to do it -- create a for-next loop and set each element to 0

Member Avatar for darklich13
0
205
Member Avatar for Serunson

>> Reputation-Altering Power What is that? both you and I (and probably everybody else too) its value is 0.

Member Avatar for overwhelmed
0
146
Member Avatar for Villanmac

[code] 41. do 42. { 43. cout << "Enter employee gross sales ( -1 to end )" << endl; 44. cin >> sales; 45. } while(sales >= 0); 46. [/code] you don't need variable [b]sales[/b]. You can enter the values directly into the [b]money[/b] array by using a loop counter, …

Member Avatar for Ancient Dragon
0
97
Member Avatar for ganbree

>>So why doesn't this work? You'll have to be just a tad bit more specific.

Member Avatar for zhelih
0
95
Member Avatar for mauro21pl

there are 26 cards in a deck, so generate a list of 26 unique but random numbers. Then if you have a list of cards, just pick them out in the order of the random numbers previously generated. It would be a lot easier to use an vector or list …

Member Avatar for WaltP
0
93
Member Avatar for dallaseve

>>//static double AnnualInterestRate static class variables are just like global variables with a class scope. They have to be declared at the top of a *.cpp file just as if they were normal global variables. [code] // account.cpp file #include "StdAfx.h" #include "Account.h" double Account::AnnualInterestRate = 0; // rest of …

Member Avatar for dallaseve
0
103
Member Avatar for kv79

you can call the win32 api function CopyFile() -- look it up in MSDN for details

Member Avatar for Ancient Dragon
0
86
Member Avatar for dbwalters
Member Avatar for linpagla

My guess is you should leave it in the junk. Someone tossed it away for a reason -- most likely because it doesn't work.

Member Avatar for linpagla
0
138
Member Avatar for k2k

you will need a get function for each of the variables so that you can do this: [code]writer<<name[x].getID() << " " << writer<<name[x].getLastName() << " " << writer<<name[x].getFirstName() << "\n";[/code] [edit]Or do it like Nurue said above[/edit]

Member Avatar for brk235
0
138
Member Avatar for Ancient Dragon
Member Avatar for jonathanasdf

in the code you posted, marray is an array of uninitialized integers, which could have any random values. Consequently the code you posted makes absolutely no sense at all. To add up all the values in the array [code] int sum = 0; for(int i = 0; i < numbers; …

Member Avatar for jonathanasdf
0
218
Member Avatar for rkavinash

one way to do it is to create an array of function pointers with associated strings for the name of the function. For example, support you type in "add", you would search the array for that word and when found call the associated function, something like this: [code] struct functions …

Member Avatar for Salem
0
117
Member Avatar for Narue
Member Avatar for curls

line 23: endl is only for cout, not cin, so you can delete that part of that line. move lines 22 and 23 up outside the loop (between lines 19 and 20. Then the loop beginning on line 20 will go from 0 to [b]n[/b]. between lines 24 and 25 …

Member Avatar for curls
0
193

The End.