15,300 Posted Topics

Member Avatar for gotnoname

The first error on line 84 means that you are trying to treat hiscore.score as if it were a simple integer -- it isn't because its an array. My suggestion is to make it a simple integer. Do you really need it to be an array? [code] struct highscore { …

Member Avatar for gotnoname
0
207
Member Avatar for cam875
Member Avatar for cam875
0
205
Member Avatar for bone7_7

Read the [b]Read Me[/b] threads at the top of this c++ board. They contain lots of information.

Member Avatar for RaiTsu
0
114
Member Avatar for saneeha

Call it twice. The first time pass 0 for pSecurityDescriptor and nLength parameters -- The function will fill in the required length in the pnLengthNeeded parameter. You can then use that value to allocate buffer and call the function again. Or you can just simply allocate a buffer large enough …

Member Avatar for Ancient Dragon
0
173
Member Avatar for ashishchoure

you could start [URL="http://www.amazon.com/s/ref=nb_ss_b?url=search-alias%3Dstripbooks&field-keywords=DirectX+programming"]here[/URL]

Member Avatar for Ancient Dragon
0
67
Member Avatar for yazooney

1) yes, 2. just means 2.0 2) That is just a shorthand if-else statement. You have to be careful with that because occasionally I've found that it doesn't work correctly. [code] if( K-Sp) > 0) aux += K-SP; else aux += 0; [/code]

Member Avatar for Ancient Dragon
0
87
Member Avatar for launic

[code] std::string line; ifstream in("filename"); while(getline(in,line,'.') ) { size_t pos; // remove embedded line feeds if they exist while( (pos = line.find('\n')) != string::npos) line.erase(pos,pos); cout << line << ".\n"; } [/code]

Member Avatar for mitrmkar
0
167
Member Avatar for clive2008

That while loop is incorrect -- you don't need to use eof() [code] include <iostream> #include <fstream> #include <string> using namespace std; int main () { fstream write; int a = 0; write.open ("RSO.txt", ios :: out); string line1; string line2; ifstream myfile1 ("RS.txt"); ifstream myfile2 ("YULIA.txt"); if (myfile1.is_open()) { …

Member Avatar for ArkM
0
74
Member Avatar for lmastex

1) the read loop is all screwed up [code] int pos = 0; while( read >> array[pos] ) pos++; // now that you have all the numbers in an array, just add them // up the way you want them [/code]

Member Avatar for lmastex
0
123
Member Avatar for nizbit

The problem is that you defined ListNode as a private member of Event class. So you can't use that structure outside ListNode. Make the structure public or move it outside any class. If you leave it as public member of Event class then you have to use Event::ListNode in order …

Member Avatar for nizbit
0
132
Member Avatar for neera_m2006

[QUOTE=neera_m2006;250083]Hi I am Neera I am doing my P.Hd in Gender Science :) from the Ohio university :)[/QUOTE] doubtful. you don't even know the correct abbreviation for it, and your spelling is not that of a well-educated person, more like that of a grade-schooler.

Member Avatar for casesensitive
0
188
Member Avatar for omdnaik

What you want to do can be done if you have enough knowledge of either c or c++ to develop MS-Windows gui program. If you do it with c++ CLI/Windows Forms, C# or VB your job will be a lot easier than using plain win32 api functions.

Member Avatar for ssharish2005
0
143
Member Avatar for chanda gul

[URL="http://www.devx.com/vb2themax/Tip/19292"]Here [/URL]is an example in VB, which you should be able to translate to c++ because they both use the same win32 api functions.

Member Avatar for Ancient Dragon
0
114
Member Avatar for unclepauly

You probably can't use HeapAlloc() to allocate memory for pThreadRecvData because std::list allocated memory from the standard heap using new operator. Replace HeapAlloc() with new and retest.

Member Avatar for unclepauly
0
114
Member Avatar for zeroth

[QUOTE=Dave Sinkula;698959]The system used [URL="http://www.sos.state.mn.us/home/index.asp?page=227"]here[/URL] is [URL="http://en.wikipedia.org/wiki/Optical_scan_voting_system#Marksense_systems"]optical mark recognition[/URL]. The ballots look like [URL="http://www.sos.state.mn.us/docs/2008_primary-general_example_ballots_6-30-08__2_.pdf"]this[/URL].[/QUOTE] That looks like the same thing we have here in southern Illinois. Voting via internet would be ideal, but too prone to fraud.

Member Avatar for Dave Sinkula
1
185
Member Avatar for kenji

you can use memmove() to shift everything left one place to overwrite the second consecutive space. [code] char str[] = "Hello World"; char* p = str; while( !isspace(*p) ) p++; if( isspace(*p) && isspace(*(p+1)) ) memmove(p+1, p+2, strlen(p+2) + 1); // + 1 to also move the NULL terminator [/code]

Member Avatar for kenji
0
9K
Member Avatar for osirus0830

the loop on line 10 will never execute because the condition [b]j > i[/b] is always false -- they are initialized to the same value (100).

Member Avatar for arinkverma
0
95
Member Avatar for gregorynoob

why use recursion when a simple loop will do. Loops are always faster than recursion (and less memory/stack intensive too).

Member Avatar for VernonDozier
0
272
Member Avatar for bhoot_jb

I suppose its just personal choice whether to use the document class or not. Myself, I have always used it, and there are a few things that MFC can't do (or easier to do) without it such as iterating through all the views of the same document. If you are …

Member Avatar for Ancient Dragon
0
87
Member Avatar for Strat79

[code] struct Object *delete(struct Object *start, int num) { int i = 1; [/code] counting in C and C++ always starts with 0, not 1. I didn't get seg fault [code] The 7-th number in the list NUMBERS is '2'. Deleted 10th element in list IDS. Inserted 7-th element of …

Member Avatar for ahamed101
0
238
Member Avatar for christina>you

I think you people have been watching too much Outer Limits ;) Dark matter exists only in your imagination.

Member Avatar for GrimJack
0
2K
Member Avatar for geemicah

what's not working? what doesn't your program do that you want it to do? You need to explain the problem. Do you take your car to auto repairman and say "Its broke, please fix it"?

Member Avatar for geemicah
0
263
Member Avatar for ! !

[QUOTE=The Dude;693647]Now this page is even more interesting!! [url]http://www.computerhistory.org/internet_history[/url] w0w,back to the 60s!! (I had forgotton about Arpanet)[/QUOTE] That link is all just bs. Everyone knows Al Gore invented the internet.

Member Avatar for The Dude
0
150
Member Avatar for holmes008

Another way to change it: Start --> Control Panel --> Folder Options You have to be logged in with Administrator privledges in order to change any of those files. [u]I would strongly suggest you leave them alone[/u] because you might wind up having to reinstall the operating system if you …

Member Avatar for Ancient Dragon
0
125
Member Avatar for nizbit

my GUESS is that item and first_name are character arrays. If that is right then you have to call strcmp() to check if the two strings are the same. Or you can change them to std::string.

Member Avatar for nizbit
0
182
Member Avatar for Lucysmith

[QUOTE=mackone;699337]I agree, tell a friend widgets will help you to drive traffic from your existing traffic. Check out this [URL="https://mail.google.com/a/ojoin.com/?ui=2&view=js&name=js&ver=-3Uo-mh7Av0&am=T_E4pcT3ckUqu0E"]youtube video[/URL], it may help you to understand word of mouth marketing[/QUOTE] The link doesn't work -- its apparently restricted for some reason.

Member Avatar for mackone
0
97
Member Avatar for gin1026
Member Avatar for gin1026
0
524
Member Avatar for ashkash

Here is one way to do it. [code] int main() { unsigned char a[4] = {0XBC,0x1e,0x04,0x00}; [color=red] unsigned long n = *(unsigned long*)a;[/color] } [/code]

Member Avatar for rpiper138
0
2K
Member Avatar for makubexiii

[code] struct node{ int next; char telnum[15]; char fname[30]; char lname[30]; char address[70]; }NODE; [/code] NODE is an instance of the structure, not a typedef name. If you want a typedef name then code like this: [code] [color=red]typedef [/color]struct node{ int next; char telnum[15]; char fname[30]; char lname[30]; char address[70]; …

Member Avatar for makubexiii
0
140
Member Avatar for JustLearning

>>I was trying to figure this out but for some reason it is illuding me you will have to be a lot more specific than that.

Member Avatar for Ancient Dragon
0
200
Member Avatar for bugmenot

your program has to do everything -- count the number of lines printed and when the screen fills up display the message then wait for user input to continue.

Member Avatar for Frederick2
0
99
Member Avatar for Frederick2

If you are using a Microsoft compiler, put your cursor on the object you want to find and right-click. That will bring up a pop-up menu which will give you the option to find the declaration of the object or class. If you are new to COM programming, buy a …

Member Avatar for Frederick2
0
477
Member Avatar for vmanes
Member Avatar for R0bb0b
0
168
Member Avatar for vk10

binary files do not have lines -- they are just a stream of bytes that could contain anything between 0 and 255. What you are talking about is a text file, not a binary file. Post the actual input file, not just an explanation of what it contains.

Member Avatar for vk10
0
106
Member Avatar for Sci@phy

[URL="http://www.codeproject.com/KB/threads/MultithreadingTutorial.aspx"]Here is one.[/URL] Just google for "multithreading tutorial" and see what it comes up with. Some may be for other languages, such as java, that you may not be interested in.

Member Avatar for Ancient Dragon
0
120
Member Avatar for AutoC

yes, very simple. Ifstream makes the appropriate conversions for you. [code] short sValue; int iValue; long lValue; ifstream in ("somefile"); in >> sValue >> iValue >> lValue; [/code]

Member Avatar for Ancient Dragon
0
53
Member Avatar for dapcigar

prompt.h: missing the return type of all functions. prompt.cpp: ditto (same problem) your zip file contains 4 different projects. That's not what you want. You need to put all those files into just one project so that they can all be linked together.

Member Avatar for Ancient Dragon
0
198
Member Avatar for c++ prog

Put the timer code in another thread. How to create the thread depends on the operatin system.

Member Avatar for c++ prog
0
116
Member Avatar for Kidd87

[QUOTE=stilllearning;699123] Your function prototype .. int delfn(acmetype *&head) .. doesn't make any sense. That makes perfect sense to me -- it's a reference to a pointer. In C language it would be the same as [icode]int delfn(acmetype** head);[/icode]

Member Avatar for Salem
0
219
Member Avatar for JustLearning

line 24 of the *.cpp code: you have to set nextPtr->nextPtr to headptr before setting headptr = nextPtr. If you don't do that you will lose all the new nodes in the list. [code] if (num == 0) { ListNode* nextPtr = new ListNode; [color=red] nextPtr->nextPtr = headPtr;[/color] headPtr = …

Member Avatar for Ancient Dragon
0
186
Member Avatar for kux

None that I know of. But you might look at a copy of [URL="http://www.amazon.com/Undocumented-Windows-Programmers-Microsoft-Programming/dp/0201608340"]Undocumented Windows book[/URL]. To my knowledge events go directly from the keyboard and mouse device drivers to the thread that has input focus.

Member Avatar for Ancient Dragon
0
116
Member Avatar for Jennifer84

Try C style implementation. I don't know if its faster or slower so you will have to test with your huge file. [code] int main () { char text[80]; int n1, n2; FILE* fp = fopen("..\\TextFile1.txt", "r"); if(fp) { while( fgets(text, sizeof(text), fp) ) { char* p = strtok(text,","); p …

Member Avatar for Jennifer84
0
7K
Member Avatar for Avaleriona

what are the mistakes? what are the error messages ? what operating system? what compiler ? In otherwords, don't just toss some code out there and expect everyone to correct it. You need to explain what you want or what the problems are.

Member Avatar for Ancient Dragon
-1
142
Member Avatar for zzmgd6

I assume num_lines_text is the valid size of the 2d array. If so [code] vector<string> theList; for(int i = 0; i < num_lines_text; i++) theList.push_back(text_string[i]); [/code]

Member Avatar for zzmgd6
0
204
Member Avatar for botter911

Yup, Narue gave you the same answer that [URL="http://www.daniweb.com/forums/thread146954.html"]I gave you just the other day[/URL].

Member Avatar for botter911
0
115
Member Avatar for JONZ
Member Avatar for Ancient Dragon
0
111
Member Avatar for Kidd87

line 77: >> fin.getline(description, 25); Unfortunately that doesn't work because the description field is not a fixed size of 25 characters in the data file. What you need to do is just read the next two words and concantinate them together: something like this [code] std::string temp; fin >> nnptr->description; …

Member Avatar for Ancient Dragon
0
96
Member Avatar for shai_chinnu

OMG This thread is just one hijack after another! Closing it.

Member Avatar for Ancient Dragon
0
106
Member Avatar for Clipper34

Depends on the operating system. In MS-Windows just go to Task Manager and stop it.

Member Avatar for Ancient Dragon
0
202
Member Avatar for JackDurden

The while statement is incorrect. [code] while( getline(myfile, line) ) { // do something with this line } [/code]

Member Avatar for Ancient Dragon
0
506

The End.