15,300 Posted Topics

Member Avatar for Jerrey
Member Avatar for Elsammos

>>for(wijzer=0;wijzer<=pointer;wijzer++) what is the value of [b]pointer[/b] >>switch(PIND) Why are you using a const PIND here? Can its value ever be changed somewhere else in your program? If not, then that switch statement has no purpose.

Member Avatar for Elsammos
0
97
Member Avatar for amt_muk

If you really want to port it to c++ then use fstream instead of those very low-level file functions. Its really not all that difficult once you understand it. [code] #include <fstream> using namespace std; int main() { ifstream in(l_chBuff, ios::binary); // blabla } [/code]

Member Avatar for mitrmkar
0
125
Member Avatar for Awebb999

[b]do[/b] is the top of a loop [code] do { // something here } while ( <some condition here that stops the loop> ); [/code] I'm not going to answer the question you posted -- write a small test program and see for yourself what the answer is. Just post …

Member Avatar for Ancient Dragon
-1
502
Member Avatar for Awebb999

what is the value of 5/9 ? Notice that is integer math, not floating point, so all decimals are lost. Once you understand that, its simple 2nd grade math to figure out the rest of the problem.

Member Avatar for mahlerfive
0
282
Member Avatar for nashmage

In order to use shared memory with more than one process or thread you have to implement some way to lock the share memory so that no more than one process/thread is accessing it at any given instance. Semaphores are often used for that purpose. [URL="http://www.google.com/search?hl=en&q=process+synchronization&aq=1&oq=process+synch"]Read some of these links[/URL], …

Member Avatar for Salem
0
119
Member Avatar for karang

CreateDocument() is a member of a class, so in the application program you have to declare an instance of that class in order to call it, unless of course it is a static method. My suggestion is to export/import the entire class instead of just one method.

Member Avatar for Ancient Dragon
0
142
Member Avatar for christiangirl

>>#include "applicant.cpp" Never, ever, under NO circumstances, do this!! DO NOT INCLUDE *.CPP like that. Instead, compile them separately and link the object modules. How to do that depends on the compiler you are using.

Member Avatar for Agni
0
182
Member Avatar for JLopeman

line 14: >> for(int a = 0; a <= NULL; a--) Do you know the definition of NULL? Answer: 0. That loop will execute as many times as it takes for a to wrap back around to a positive number, which could be a whole lot of iterations. [icode]for(int a …

Member Avatar for JLopeman
0
69
Member Avatar for Yilon

what kind of computer and operating system do you have? Amount of RAM and size of hard drive. You will need Windows XP with SP2 or Vista to run that compiler. If you don't have that, then you can download free [URL="http://www.codeblocks.org/"]Code::Blocks[/URL] or [URL="http://www.bloodshed.net"]Dev-C++[/URL]. Dev-C++ is getting rather old now …

Member Avatar for Ancient Dragon
0
170
Member Avatar for inktri

In a timer thread do this: [code] class MyObject { public: ... void Destroy() {delete this;} ... }; MyObject* obj = new MyObject; // in a timer thread obj.Destroy(); [/code]

Member Avatar for kux
0
446
Member Avatar for robgeek

How to do it depends on the contents of file1. If file1 only contains one line of text then it should be pretty simple [code] ifstream file1("filename.txt"); ofstream file2("outfile.txt"); string input = "Hello World"; string line; file1 >> line; file2 << line << input; [/code] It becomes a little more …

Member Avatar for StuXYZ
0
168
Member Avatar for habuchas

First, SetName() is attempting to copy the name to an uninitialized pointer -- guarenteed to crash your program bigtime. Instead of using a char* for Name why not use the c++ std::string class so that you don't have to worry about memory allocation and all the problems that go along …

Member Avatar for Ancient Dragon
0
87
Member Avatar for cloudedvision

[URL="http://www.daniweb.com/forums/thread121245.html"]icon question/answer[/URL]

Member Avatar for Ancient Dragon
0
50
Member Avatar for botter911

You are confusing characters positions with string positions. Your program is not sorting the string in the list array but attempting to sort the characters in just one of the strings. And it doesn't do that very well either. 1) go back and review the selection sort algorithm and compare …

Member Avatar for Ancient Dragon
0
119
Member Avatar for Lardmeister
Member Avatar for ddanbe
0
478
Member Avatar for wann100

This can't be your first class assignment -- by now you must have some clue about how to write a program and studied input and output file streams. Like any other program, start small, break it down to small parts that you can program. For example, begin by writing a …

Member Avatar for ddanbe
0
109
Member Avatar for Creation34

Why not put your music degree to work in the IT field. I should think you could get a job at one of the big game houses providing and/or writing music for the games. You might also want to get back in school and get another degree in computer science.

Member Avatar for Denniz
0
138
Member Avatar for naina_gill

OMG Everybody wants to program games :) Game developers are a dime a dozen, so unless you are very very exceptional developer you should do something else. At any event, how much programming experience do you have? None: Then spend a few years learning the trade and maybe you will …

Member Avatar for vandenzergen
0
254
Member Avatar for amerninja2

Oh gee golly moses. [URL="http://www.tenouk.com/cnwinsock2tutorials.html"]This[/URL] was the first in the list of [URL="http://www.google.com/search?hl=en&q=winsock2+tutorial&aq=f&oq="]google links[/URL]

Member Avatar for MosaicFuneral
-1
223
Member Avatar for cloudedvision

Not directly, but there are a couple work-arounds. 1) use a series of if statements to test the string value then call the function [code] if( pie == "do_something" ) do_something(); else if(pie == "something_else" ) something_else(); // etc etc for all string values [/code] 2) use <map> to map …

Member Avatar for Ancient Dragon
0
84
Member Avatar for aktharshaik

I like it, but can only play one key at a time because you have to use it like playing the piano with one finger. Now if there was a way to play it using all 10 fingers (and maybe toes too)!

Member Avatar for The Dude
0
61
Member Avatar for asifjavaid

[URL="http://www.codeproject.com/info/search.aspx?artkw=com+and+managed+c%2B%2B"]CodeProject[/URL] has some articles that may help you.

Member Avatar for Laiq Ahmed
0
203
Member Avatar for C++.java

>>i want an instant answer With a title like that most people will just ignore you. And you have to be a lot more specific about what you need. There are billions of different answers to the crappy way you formatted your question or statement.

Member Avatar for Salem
-1
131
Member Avatar for ACRobison02

>> I'm not sure why but I keep having alot of problems. What are the problems? Error messages? compiler you are using? Operating system ?

Member Avatar for cikara21
0
106
Member Avatar for Dani

I almost never read any of those blogs because they rarely have anything that is interesting to ME to read. But after reading this thread just now I went to have another look -- and sure enough there were a few non-technical blog entries, such as the one written by …

Member Avatar for Dave Sinkula
0
140
Member Avatar for acperson

The problem is at the last line of invoice.h -- a semicolon is required at the end of a class declaration.

Member Avatar for acperson
0
463
Member Avatar for qaizaar

you should probably get the recommended book [b][i]Introduction to Computing Systems: From Bits and Gates to C and Beyond [/b][/i] and read it. I don't know the first thing about it, so can't help you.

Member Avatar for c0dex
0
137
Member Avatar for Awebb999

You are going to have to add more parameters to the bubble sort function. When the primary array members are exchanged, all the other array members must also be exchanged so that all the arrays are kept in sync with each other. Example: [code] void bubbleSort(string Name[], int id[], float …

Member Avatar for Awebb999
0
152
Member Avatar for FTProtocol

>>string ****Nipples; OMG what in hell are you trying to do here??? If you are trying to code an array of string's then its [icode]string Nipples[4];[/icode] But the reading part should look like this: (I hope you change the variable names before turning in the assignment because your teacher may …

Member Avatar for Ancient Dragon
0
188
Member Avatar for Freaky_Chris

Its a difference in compilers and the way they handle floating point arithmetic. VC++ 2008 Express produces 0. Dev-C++ produces the value you quoted. Dev-C++ is an old compiler now and may have a few bugs. Maybe someone with CodeBlocks can try it to see if the bug has been …

Member Avatar for StuXYZ
0
263
Member Avatar for acperson

you are attempting to pass an array of strings to getSize(), but it only expects an array of characters. getSize() is nothing more or less than your own version of the standard C library function strlen().

Member Avatar for acperson
0
3K
Member Avatar for ALAZHARY

>>How can I monitor every little step of the function like that? 1) use a debugger or 2) take a short test string and follow it manually. For example: "H W". Initially variables i and j are both 0, so it will just copy the character 'H' onto itself, then …

Member Avatar for Laiq Ahmed
0
179
Member Avatar for Jen0608
Member Avatar for Ancient Dragon
0
59
Member Avatar for sid78669

I don't see a problem with that code. It is legal and ok for a class to return a string like that.

Member Avatar for sid78669
0
213
Member Avatar for Manutebecker
Member Avatar for Ancient Dragon
0
121
Member Avatar for Susan90

First, do you know how to read a file in C language? If not, [URL="http://www.cprogramming.com/tutorial/cfileio.html"]here's a tutorial[/URL] The position in problem #1 can be interpreted a couple ways depending on how the file is formatted. If all the numbers are on one long string, then the position will be the …

Member Avatar for Susan90
0
157
Member Avatar for csaund1

sum them all up and divide by the size of the array. For example [code] int a[3] = {2,4,6}; The sum is 2+4+6 = 12 The average is 12/3 = 4 [/code]

Member Avatar for chococrack
0
178
Member Avatar for karang

m_Test is apparently a member of cls class. CreateInputFilter() is not a member of that class, so it doesn't know what m_Test is.

Member Avatar for karang
0
218
Member Avatar for karang

You use dll functions all the time in c++ programs. Every win32 api function and every standard c and c++ functions are contained in dlls. (they could also be statically linked, but that's for another discussion) So use your dll just like the others, include the header file and link …

Member Avatar for Ancient Dragon
0
75
Member Avatar for abernut++

The first parameter to averageGrade() is supposed to be an int array, you are attempting to pass an array of Student classes. The second parameter is supposed to be the number of elements in the first parameter -- you are attemtping to pass a float that represents the average. The …

Member Avatar for cikara21
0
143
Member Avatar for tori10

Variable [b]sums[/b] in the second code snippet is being used before it has been initialized. Look on line 5: what is the initial value of sums.x? Answer: its unitialized and could contain any random value. So the initial result of line 5 is undefined because we don't know the value …

Member Avatar for Salem
0
125
Member Avatar for namehere05

You are attempting to stuff 3 bytes (string2) into a character array that is only 1 byte (string1). Try this: [code] [color=red]int[/color] main() { [color=red]char string1[4] = {0}[/color] char * string2 = "EL"; StrCpy(string1, string2); //cout << string1; //must output EL } [/code]

Member Avatar for namehere05
0
614
Member Avatar for Awais Ahmad
Member Avatar for Murtan
0
119
Member Avatar for yingfo

My guess is that in main.cpp, the Graph object has not been initiaized, so when ReadGraph() is called and attempts to delete arrayEdges, CRASH/COREDUMP. In main() initialize all Graph variables to 0 before calling ReadGraph() to see if that resolves your problem. [code] int main() { Graph g; memset(&g, 0, …

Member Avatar for yingfo
1
260
Member Avatar for DemonGal711

Every line in a text file ends with '\n'. According to your instructions you would have to skip the last word of every line that is read. Lines do not have embedded '\n' characters.

Member Avatar for DemonGal711
0
82
Member Avatar for The Dude
Member Avatar for raja289

Can you use the functions in time.h? If you can, then just fill in a struct tm and call mktime() to calculate tomarrow [code] #include <time.h> ... int main() { int m = 11; // November int y = 2008; int d = 2; struct tm tm; // clear all …

Member Avatar for devnar
0
120
Member Avatar for rlp1938

Assuming you are using MS-Windows, you will probably find something in one of these [URL="http://msdn.microsoft.com/en-us/library/ms534233(VS.85).aspx"]Font and Text Functions.[/URL]

Member Avatar for d0pedup
0
226
Member Avatar for jtb19nh

There is no such macro declared in windows.h. Maybe you mean [URL="http://msdn.microsoft.com/en-us/library/ms633548(VS.85).aspx"]SW_MAXIMIZE[/URL] ? If yes, then look in WinUser.h header file

Member Avatar for Ancient Dragon
0
27

The End.