15,300 Posted Topics

Member Avatar for diagramatic

Coding standards??? According to who's standards? My standards and your standards could be quite different, so I doubt there is any tool that can or could do a very good job of it. In a group of coders larger than 1 person that's what peer review does -- each coder …

Member Avatar for CharlesKramer
0
243
Member Avatar for ben25x

The function you are calling is UNICODE function. LPWSTR is a pointer to a unicode string, not an ascii string. You need to declare the string like this: [icode]wchar_t ConvertTime[9];[/icode], or if you want to compile the program as either ascii or unicode then use the macro TCHAR: [icode]TCHAR ConvertTime[9];[/icode] …

Member Avatar for ben25x
0
347
Member Avatar for biljith

The struct tm in time.h or ctime contains an integer that represents the day of the week. After getting the date from the keyboard just fill in a struct tm and pass it to mktime() to complete the structure. You must zero out all the elements of the structure before …

Member Avatar for Ancient Dragon
0
107
Member Avatar for rem45acp

You got -1 because mktime() also considers the hours, minutes and seconds fields of the tm structure. Just use memset() to initialize the structure to all 0 then fill in the year month and day Also -- [URL="http://www.cplusplus.com/reference/clibrary/ctime/difftime/"]difftime()[/URL] takes two time_t objects, not pointers to two struct tm objects. [code] …

Member Avatar for Ancient Dragon
0
332
Member Avatar for kylemurray123
Re: c++

If you just want your console program to display the data in coluns you can use setw() to set the solumn width and left or right to left or right justify the data inside the column. Example [code] #include <iostream> #include <iomanip> using std::cout; using std::right; using std::setw; int main() …

Member Avatar for Ancient Dragon
0
137
Member Avatar for tawes01

[URL="http://www.sevenforums.com/tutorials/1401-startup-programs-change.html"]This [/URL]will explain how to add a program to startup folder

Member Avatar for Duki
0
106
Member Avatar for Duki

I didn't, but my boss did -- he got an MBA. Was it worth it? Definitely -- opened many doors for supervisory and department head positions, not to mention more $$$.

Member Avatar for Ancient Dragon
0
154
Member Avatar for G4M3R 0N3

Did you not read the requirements in the link you posted? They state, in one sentence, the difference between the two degrees. Choose the one that best suits your interests. You should also discuss this with your school counseler because he/she is in the best position to guide you.

Member Avatar for Ancient Dragon
0
252
Member Avatar for Danny1994

[URL="http://msdn.microsoft.com/en-us/library/z0tayb1b.aspx"]SetBouds[/URL]() will move the window to the x and y coordinates you specify. There is probably more than one way to do it, but this is how I solved the problem. 1. In Form2 add a public data member of type Rectangle, e.g. [icode]Rectangle r;[/icode] 2. In Form1, in the …

Member Avatar for Ancient Dragon
0
183
Member Avatar for zahraT

you need to use a keyboard interrupt -- [URL="http://webpages.charter.net/danrollins/techhelp/0228.HTM"]int 16h[/URL]. Put it in a loop, saving each character in your own buffer, until user presses the Enter key. I would make this a separate function. You will have to check that user does not type spaces in the path because …

Member Avatar for Ancient Dragon
0
114
Member Avatar for andylbh

>>Is there a solution to this? Yes, use a loop. Your question is too vague to be of much more help.

Member Avatar for kings_mitra
0
105
Member Avatar for WildBamaBoy

what is it that you want to do with strings? There's possibly an equivalent in c++.

Member Avatar for WildBamaBoy
0
265
Member Avatar for sanzilla

STL does nothing for MS-Windows programming. The intent of STL is portability not anything os-dependent. MFC and STL are not either or situation -- learn both. If I were going to begin a new project today I don't think I would use MFC because there are several other alternatives such …

Member Avatar for caut_baia
0
706
Member Avatar for MasterGberry

USERPROFILE environment variable works for me with Windows 7 [code] #include <iostream> using std::cout; using std::cin; int main() { char* p = getenv("USERPROFILE"); if( p ) cout << p << '\n'; else cout << "USERPROFILE not found\n"; cin.get(); } [/code]

Member Avatar for MasterGberry
0
2K
Member Avatar for AndreRet

[QUOTE=Nick Evan]I'll continue my anti-sigspammer campaign, because I think it's starting to work :)[/QUOTE] You must be yelling pretty loudly because I think you are being heard all the way over to PFO. I noticed the some spammers there are creating just one thread and posting about 20-30 spam messages …

Member Avatar for WASDted
0
273
Member Avatar for apanimesh061

You might have to enable Expert settings. Go to Tools --> Settings, then check Expert settings. This has got to be one of the dumbest things Microsoft has ever done in their compilers.

Member Avatar for alaa sam
0
202
Member Avatar for ArtOfShred87

[URL="http://www.daniweb.com/forums/thread13153.html"]Here [/URL]is a tutorial you can start out with. Hope it helps. BTW I've never used that so I will not be able to help you with it.

Member Avatar for jordan0420
0
241
Member Avatar for jfunchio

why is it checking to see if den == 1? What does that have to do with whether its negative or not? [icode]if(num||den < 0)[/icode] That line is wrong. Should be [icode]if(num < 0 ||den < 0)[/icode]. The previous if statement on lines 112-119 is meaningless.

Member Avatar for Fbody
0
355
Member Avatar for Duki

That really sucks cannel water. I don't know the last thing about web programming, but isn't it a DaniWeb problem? Or does the advertisers control the content of their ads on DaniWeb?

Member Avatar for Dani
0
216
Member Avatar for Ascaris

0 and '\0' are identical and can be used interchangealy, which one you use is only a matter of programming style.

Member Avatar for Ancient Dragon
0
294
Member Avatar for Duki

The code is incorrect and the compiler will puke out errors at you. All parameters must be passed by reference. [icode]method(&a, &b, &c);[/icode]

Member Avatar for Duki
0
216
Member Avatar for Crutoy

>>why not just assign memory location to p ? Because the intent of the exercise is to show you how to make a duplicate copy of the original.

Member Avatar for lisaroy1
0
305
Member Avatar for jmaple

It's very similar to int ** -- a pointer to a pointer. That allows a function to change a pointer declared in the calling function. For example: linked list. When the pointer to the head of a linked list is declared in main() the pointer has to be passed by …

Member Avatar for jmaple
0
99
Member Avatar for lius84

Check for buffer overruns and writing beyond the array bounds, which most likely will trash memory. This can be a tough job in large programs, so I'd start by commenting out large blocks of code until the problem disappears so that you can narrow down the problem.

Member Avatar for mike_2000_17
0
181
Member Avatar for RuneFS

I don't know about anyone else, but I haven't the foggiest notion of what you are asking.

Member Avatar for IssamLahlali
0
118
Member Avatar for muze

[URL="http://msdn.microsoft.com/en-us/library/aa315106(v=VS.60).aspx"]Tutorial here[/URL]

Member Avatar for Ancient Dragon
0
81
Member Avatar for dbdavis

Welcome to DaniWeb. I too retired from computer programming about 4 years ago because I was just getting too old to put up with all the stress that is involved. Let the younger people do it :) We need experienced coders around here to help younger people with their problems,so …

Member Avatar for AndreRet
0
259
Member Avatar for cloudspade

"@" is not a command in any version of MS-DOS or MS-Windows. In the cmd prompt type Help <Enter> and you will get a list of all valid commands.

Member Avatar for Ancient Dragon
0
84
Member Avatar for darknoobie

macro is not a function -- its just a simple substitution for actual code. Whether it does what you are asking or not I have not the slightest clue.

Member Avatar for darknoobie
0
202
Member Avatar for SpecialForce

Put all that code in a *.bat file then call it from your c program, or just write the c program to do it by calling functions FindFirstFile() and FindNextFile(), then call delete() to remove the files.

Member Avatar for Ancient Dragon
0
127
Member Avatar for Hey90

You can use any character you want to flag the record as being deleted -- just use a character that is not likely to be valid in the record. Using '\0' may not be your best choice because that will make the file binary. I'd use something like tilda, or …

Member Avatar for Adak
0
257
Member Avatar for AmerJamil

What are your answers? Instead of us just telling you the answers you should try to figure them out yourself, post the answers, and we'll grade your work or answer questions about what you don't understand.

Member Avatar for VernonDozier
0
128
Member Avatar for tux4life

tux4life said his version worked exactly like the original -- and core dump or seg violation is what the original does too :)

Member Avatar for Ancient Dragon
0
205
Member Avatar for fmcyamwe

I have not read your code, but that error tells you that you did not code a function named draw(). You may have prototyped it, but you didn't actually code it.

Member Avatar for Ancient Dragon
0
24
Member Avatar for nathanw

Note that if you are using precompiled header stdafx.h must be the very first include file in the *.cpp file. If you are not using precompiled headers then it won't matter one way or the other where it is, and you could even delete it altogether if there is nothing …

Member Avatar for jonsca
0
214
Member Avatar for Vierco

>>when i try load Array (mMemory) whit data from txt i have error What error? The code you posted does not atempt to read mMemory from a text file. And why is that in a loop?

Member Avatar for douglaspr
0
132
Member Avatar for MasterGberry

What is that loop beginning on line 20 trying to accomplish? Read a file one byte at a time until EOF? ifstream.read() will return NULL when EOF is reached, so all you need to do is this: [code] char byt; // no need for a pointer here while( inFileDrs.read(&byt, 1) …

Member Avatar for MasterGberry
0
164
Member Avatar for ThatGuy2244

You don't want to screw around with eflags like that -- you are misusing that flag. What you want to do is declare a variable to hold all the bit-mapped flags then you can set and clear the individual bits to your heart's content.

Member Avatar for ThatGuy2244
0
189
Member Avatar for shiny27

>>I want to insert a variable finalScore into an array competitorsArray[competitorCounter] Depends on what you mean by "insert". If you have an array that already contains numbers and you want to insert another one in the middle of the array without destroying the number that is already there then you …

Member Avatar for Ancient Dragon
0
193
Member Avatar for rusl07cl08

I think you are trying to make this more difficult than it really is. If you enter the psi for all 4 tires then all you have to do is subtract the psi of the two front tires to see if the result is less than 3, then do the …

Member Avatar for Ancient Dragon
0
106
Member Avatar for HENRYSUGAR

First program: line 18: fread() doesn't work very well with stdin because it doesn't terminate the input with the string null terminator. That's why everyone calls fgets(). Since you are writing a c++ program you can do away with fgets() and fread(), just use the functions in std::cin and std::string …

Member Avatar for HENRYSUGAR
0
164
Member Avatar for aimbo

In this case simply replacing the hyphens with spaces will not do it. For example 5-9 means 5, 6, 7, 8 and 9. Assuming that is the case, the code in lines 22-33 won't work. You need to extract the two numbers in the string "5-9" then create a loop …

Member Avatar for Adak
0
145
Member Avatar for TailsTheFox

That's wrong. [code] Form2^ fm = gcnew Form2; fm->ShowDialog(); [/code]

Member Avatar for TailsTheFox
0
93
Member Avatar for happygeek

[QUOTE]I wish I had not drunk quite so much beer over the weekend. Oh boy, does my head know about it this morning. That said, it would have been rude not to use the pint glass that my son had bought me as present. It has the Spitfire logo on …

Member Avatar for mrnutty
3
175
Member Avatar for Zvjezdan23
Member Avatar for dip7
Member Avatar for cbsinc

You are just kidding yourself if you think you can start with nothing and get a Ph.D. in two years. Good luck with that, but your goal is not reasonable. In USA a bachelors degree takes an average of 4 years (some very bright people can do it in one …

Member Avatar for Ancient Dragon
0
101
Member Avatar for BimBam

A DLL can not be used as a start application because it isn't an application. A DLL is nothing more than a collection of functions and classes that can be shared among multiple applications. A DLL itself can do nothing. You can only set one of the projects in a …

Member Avatar for BimBam
0
94
Member Avatar for elsiekins

google is you friend, learn to use it. [URL="http://lmgtfy.com/?q=c%2B%2B+array+of+size+0"]Click here[/URL]

Member Avatar for elsiekins
0
422
Member Avatar for hitler1331

>>char *r = memcp(d,s,6); do you mean to call memcpy()? There is rarely a reason to catch the return value of memcmp() because all it returns is the destination buffer pointer. It has no error checking.

Member Avatar for Ancient Dragon
0
75

The End.