15,300 Posted Topics

Member Avatar for mr.cool

>> strcpy(view[place[i].y][place[i].x],"s");//says that the problem is here[/b] That is just a character, not a pointer. same as attempting to do this: [icode] strcpy( view[0][0], "S");[/icode] If all you want to do is replace the single character then use the assignment operator, not strcpy(); [icode] view[place[i].y][place[i].x] = 's';[/icode]

Member Avatar for mr.cool
0
118
Member Avatar for WIP
Member Avatar for Ancient Dragon
0
385
Member Avatar for nelledawg

>>capitalize the first letter of each word they type in, One way to do it would be to use strtok() to find each work then toupper() to change the first character to upper case. strtok() modifies the original string so you will want to make a copy of the string …

Member Avatar for jephthah
0
106
Member Avatar for digi-girl

You are getting those errors because you didn't write those functions yet. The three lines just before main() are not functions, they are just [b]prototypes[/b], which tell the compiler about the return value and parameters. You still have to write all the code that makes them do something.

Member Avatar for Ancient Dragon
0
128
Member Avatar for Azurea

Are you looking for a function that takes a variable number of arguments such as printf() ? [icode]void foo(int a, ...);[/icode] Look up [URL="http://www.opengroup.org/onlinepubs/007908799/xsh/varargs.h.html"]varargs.h[/URL] and associated functions.

Member Avatar for Ancient Dragon
0
102
Member Avatar for dallaseve

typecast it [code] float n = 123.45F; double x = (double)n; or double x = static_cast<double>(n); [/code]

Member Avatar for dallaseve
0
74
Member Avatar for Ancient Dragon

This doesn't work very well any more. Something broke just today I think. See [URL="http://www.daniweb.com/forums/thread113546.html"]this thread[/URL] and click the Toggle Plain Text link.The whole thing shrivels up to just one or two lines with vertical scrollbar. In the last post in that thread all the text is placed on one …

Member Avatar for Ancient Dragon
0
99
Member Avatar for Syntax Error

>>//why this doesnt have sizeof? =)temp->name=(char*)malloc(strlen(tempString)+1); >>//this is based on the linked list example 1(above) >>//why this doesnt have sizeof? =) It doesn't use sizeof(tempString) probably sizeof(any pointer here) is only 4 on 32-bit machines while the length of the string can be much much more than that. And the …

Member Avatar for Ancient Dragon
0
203
Member Avatar for robotnixon

line 4: delete it because its redundent. Its not necessary to predeclared the class if your going to fully define it in the very next line. line 13: As written that function does nothing. YOu need to add a bit of code that sets array Grade = array G. line …

Member Avatar for robotnixon
0
456
Member Avatar for marianomartinez

It can't be done in MS-DOS either because there are no email servers for that os.

Member Avatar for Ancient Dragon
0
30
Member Avatar for bornok15

>>What topics or lessons should i master All of them. Buy a book Introduction To C++ (there are lots of good ones) and start studying from page 1.

Member Avatar for Ancient Dragon
0
71
Member Avatar for samer.daur

do you have to write your own linked list or can you use ready-made such as <list> ? Isn't the information about files and lists in your textbook? Did you read your textbook?

Member Avatar for Ancient Dragon
0
133
Member Avatar for harneetarora

>>The program is working fine your program may be complete but it is NOT working fine as you stated. Why? Because line 41 is wrong -- feof() doesn't work like that. And the loop from lines 46-60 is also written inefficiently. [code] vector<string> words; // an array of words while( …

Member Avatar for Ancient Dragon
0
110
Member Avatar for sahil_itprof

line 40: You are attempting to use an uninitialized pointer as the input buffer to `getline()`. That will most certainly cause your program to scribble all over hell and back and is most likely one of the causes of the behavior you are reporting. On line 38 replace `char *a;` …

Member Avatar for sahil_itprof
0
115
Member Avatar for henpecked1

>>Wow, no one after an hour? Is it that hard or did I just mess it up that badly I was naping :) function [b]totallength()[/b] The parameter must have a variable name, you can't just put a data type without a variable named. Variable names can be omotted ONLY in …

Member Avatar for henpecked1
0
285
Member Avatar for starkman

You mean you have two *.cpp files that you want to compile together into one executable program? Yes, put one in the program's main thread, create another thread during initial startup in main() then put the other code in the second thread. Exactly how to do that depends on the …

Member Avatar for Ancient Dragon
0
194
Member Avatar for digital_ice7

>> cin >> address; The >> operator does not accept spaces. So if your address contains spaces it will pick up only the text before the first space. Use getline() to get everything including spaces.

Member Avatar for skatamatic
0
123
Member Avatar for morb

The functions in graphics.h are only supported by old ancient Turbo C and Turbo C++ compilers. Those functions can not be used by any modern 32-bit compiler. You can either get a copy of that old MS-DOS compiler or use win32 api GDI functions or get one of several graphics …

Member Avatar for morb
0
3K
Member Avatar for mattyd

I find IE7 more difficult to use then IE6 despite the new tabs. I still like FF better and use it all the time at home. I'm not allowed to use FF at work -- only IE.

Member Avatar for GrimJack
0
373
Member Avatar for yarita

line 28 and 36: array index values begin with 0, not 1. Those two loops will cause the program to write beyond the bounds of the array. Code them like this: [icode]for (count = 0; count < testscore; count++)[/icode] You can do everything on just one loop -- no need …

Member Avatar for Majestics
0
161
Member Avatar for manikantag
Member Avatar for 88omar
Member Avatar for The Dude

take all the shopping channels off, but someone must be buying all their crap or they wouldn't be selling it on tv.

Member Avatar for bumsfeld
0
120
Member Avatar for nurulshidanoni

What are you trying to count? Number of examcodes for each student? line 10: you want to use the == operator there, not the assignment = operator.

Member Avatar for hammerhead
0
150
Member Avatar for ithelp

You've added a lot of great comments and helping others. Keep of the great work :)

Member Avatar for zandiago
0
100
Member Avatar for softlysoar

Welcome to DaniWeb. >>I'm not a guru so I might be in the wrong place There are a lot of people who are not guru's. Please feel free to browse through all the boards and participage where you feel you want to, which I hope is often.

Member Avatar for zandiago
0
48
Member Avatar for Al-Saeed

Welcome to DaniWeb. I know you will find lots of help is only you ask.

Member Avatar for zandiago
0
71
Member Avatar for hajjo

>>P = (rho * g * delta_h_water) + 1 atmosphere [code] int P; int rho; int g; int delta_h_water; //set those values to some values is not shown P = (rho * g * delta_h_water) + 1 ); [/code] >>V = pi r^2 * h [code] #include <cmath> double V; …

Member Avatar for VernonDozier
0
114
Member Avatar for MidiMagic
Member Avatar for jtwsl13

line 11: that is a pretty screwy way to generate a random number. The normal method is to first seed the random number generator so that you get a different set of random numbers each time the program is run. [code] int main() { srand( time(0) ); int x = …

Member Avatar for Ancient Dragon
0
77
Member Avatar for ngozinyeusi

>>im a biginner level in Visual C++ version 6.0 That's unfortunate because that old compiler doesn't support c++ very well. You will be much better off if you download VC++ 2008 Express, which is free for the downloading. Otherwise, I don't know the answer to your question.

Member Avatar for Lerner
0
229
Member Avatar for artisabang

Look at an [URL="sum_total"]ascii chart[/URL] -- the letters 'A' - 'Z' have decimal values of 65 - 90. So just generate a random number between 0 and 26 then add 65.

Member Avatar for WaltP
0
10K
Member Avatar for cmoney12051
Member Avatar for cmoney12051
0
110
Member Avatar for Jennifer84

I realize you didn't post all your program, but what do you do with the vector [b]ReadInData[/b] that is declared inside that for loop ? The entire vector is destroyed on each loop iteration and you do nothing with it but toss it into the bit bucket.

Member Avatar for Jennifer84
0
120
Member Avatar for ngozinyeusi

you are using the wrong compiler. Get ancient TurboC or Turbo C++ and it will probably compile.

Member Avatar for Ancient Dragon
0
90
Member Avatar for Floh85

InitApplication() references a function names WinProc. You have to add that function to your program before it will link successfully. That function will probably be explained a little further on in your book, or you can study [URL="http://www.winprog.org/tutorial/"]this tutorial[/URL].

Member Avatar for Ancient Dragon
0
122
Member Avatar for maggz

function profiling is calculating the amout of time it takes for a function or other algorithm to execute. Because they execute so quickly it is usually necessary to crete a test program that will run the test data through the algorithm thousands of times in order to achieve a measurable …

Member Avatar for Ancient Dragon
0
87
Member Avatar for harishankarb

[URL="http://msdn2.microsoft.com/en-us/library/ms724845(VS.85).aspx"]RegDeleteKey()[/URL]

Member Avatar for mitrmkar
0
102
Member Avatar for bwjones

Is there a reason there is so much extra bloat in that program ? For example there no need for variable [b]pb[/b] at all or for the parameter in function [b]calc[/b] Here is a somewhat simpler version: It could be simplified a lot more but I don't know what you …

Member Avatar for bwjones
0
109
Member Avatar for sulabh

If you have all the source code then just export it and recompile. Put the class in a *.h file and include it in the application *.cpp file like you would any other header file, then at link time link with the *.lib file that's created when you compiled the …

Member Avatar for sulabh
0
79
Member Avatar for wawaron

Welcome to DaniWeb. Post your question in Tech Talk and I know someone will be able to assist you.

Member Avatar for zandiago
0
72
Member Avatar for Havik82

There are thousands of free programs at [url]www.codeproject.com[/url].

Member Avatar for technogeek_42
0
179
Member Avatar for kishan4every1

[URL="http://www.space.unibe.ch/comp_doc/c_manual/C/CONCEPT/bitwise.html"]Bitwise operators[/URL] The last one, line 15, is just null-terminating the string. The author could have simply use 0 instead of 0x00.

Member Avatar for jephthah
0
105
Member Avatar for kittycat07us
Re: Help

[icode]x = tolower(x);[/icode] is how you convert the character in variable x to lower-case.

Member Avatar for kittycat07us
0
108
Member Avatar for dilip.mathews
Member Avatar for amitahlawat20

there are several ways to convert a string of digits to an integer. One of them is by using c++ stringstream class, which is based on fstream but works on strings instead of files [code] #include <string> #include <sstream> int main() { char digits[] = "1234"; int x = 0; …

Member Avatar for Narue
0
127
Member Avatar for fluidtype
Member Avatar for fluidtype
0
123
Member Avatar for cseale03

>>'fopen' was declared deprecated That's only a microsoft warning. You can just ignore it because the c++ standards has not made it deprecated. FILE, fopen() and all associated functions are declared in stdio.h, not iostream or fstream. In c++ programs you really should not be using those C functions, in …

Member Avatar for cseale03
0
107
Member Avatar for technogeek_42

never heard of getdate() and setdate(). But time.h, or ctime, has similar standard C functions getsystime() and setsystime(). [edit]After looking at the link Nick posted I realize they are not the same afterall.[/edit] @technogeek: (you name is a misnomer). If you scroll down to the bottom of nick's link it …

Member Avatar for technogeek_42
0
442
Member Avatar for Rand al'Thor

>>What do you mean by the functions having an internal linkage? [URL="http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=/com.ibm.vacpp6m.doc/language/ref/clrc01cplr081.htm"]Explaination here[/URL]: >>Also, from my understanding, an anonymous namespace is just one without a name, so how would I call that? The same way you do all other functions in the standard C/C++ libraries (other than class libraries). None …

Member Avatar for Rand al'Thor
0
168

The End.