3,183 Posted Topics
Re: Are we talking about working with OpenXML directly or through an SDK? | |
Re: > Those that have broader ideas and need detailed and solid information will always use forums. Will they still use forums if none of the good forums can fund themselves well enough to stay up? | |
Re: It's syntactically incorrect since the string literal wasn't properly started, but otherwise the code is legit C++: cout << "Concert4 Program Answers.\n\n"; What concerns in particular do you have about the statement? | |
Re: [QUOTE]but if I don't use stdafx. vs would give me a precompiled header error.[/QUOTE] You can turn off precompiled headers in the project settings. [QUOTE]it is a win32 console project..[/QUOTE] Anything except an empty project will add Microsoftisms. When you're trying to write portable code, I'd recommend starting with an … | |
Re: > I'am curious if it is possible and how to add drad & drop functionality to a window of an external application. Only of the external application supports drag and drop, and you'd need to figure out how to make drag work between them. This strikes me as a tricky … | |
Re: The only obvious potential issue at a glance is this: while (cWhoWon == ' '){ Your character literal is two spaces rather than one. | |
Re: Do you really want to terminate the program or just terminate the input process? The latter strikes me as more intuitive: int main() { int arr[0], i, sum = 0; cout << "Enter values: "; for (i = 0; i < 10; i++) { int input; if (!(cin >> input) … | |
Re: > so plz send me source code No, do your own homework. If you have specific questions or problems, feel free to ask those, but Daniweb is not your personal cheating service. | |
Re: Possible, yes. We technically could extend Markdown to support this feature, but I suspect Dani doesn't want to lock us into a specific version of the libraries because that would make upgrades quite a bit harder to apply. | |
![]() | Re: `*p=&a` is a type mismatch if you want to flatten the array. Try `*p = &a[0]` instead. Also note that this trick isn't strictly portable due to how C restricts pointers walking past the end of an array. It'll work on every implementation I'm aware of though. ![]() |
Re: > C99 concept of variable array is not accepted in Recent Compilers .They give errors like" Constant Expressions required in Function main on line 9" Then you're not compiling as C99. The compiler also must support C99, which not all recent compilers do. Further, it looks like you're using Turbo … | |
Re: How are the weapons stored? Are they always a string in display format? Because it would be easier to have a weapon class that separates these things and makes it easier to work with: #include <algorithm> #include <cstdlib> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; struct … | |
Re: Continuing milil's tangent, there *are* experts in the Java forum, for example. However, the questions on average are gradually becoming dumber, lazier, and a waste of time. So encouraging experts to participate more often should start with ensuring that quality questions are asked. The problem is that this is difficult … | |
Re: You can, but static data member definition isn't exactly intuitive without a fairly good understanding of the object model: class outside { public: class inside { public: static int x; // Declare as normal }; }; // Define using name resolution int outside::inside::x = 123; | |
Re: The assignment uses a lot of words for not a lot of work. That's a good thing, because it's very detailed, and all you need to do is put it in UML/code form. So now for the obligatory "what have you done"? It's against Daniweb rules to post just a … | |
![]() | Re: The last two would be recommended for not wasting memory. However, there are two questions that determine which you use, or if you want to go with dynamic memory allocation instead: 1. Do you intend to modify the string? 2. Do you indend to grow the string or is the … |
![]() | Re: > Someone please point out where is loophole in my knowledge. The missing link is sequence points and undefined behavior. In `c=(--a)+(--a);`, `a` is being modified multiple times between sequence points, which invokes undefined behavior. The compiler is under no obligation to do anything predictable. Your second attempt removes the … |
Re: Because `10, 20, 30` does nothing more than evaluate to `30` due to how the comma operator works. `30` is an integer literal, which isn't compatible with a pointer to `int` unless you use a cast to make it an address: int *p = reinterpret_cast<int*>(30); This compiles, but it's not … | |
Re: > I don't really means what cloud computing really means. It's nothing more than a marketing term for distributed computing. The internet is the quintessential cloud. | |
Re: > C... is a fickle beast ya know. Sounds more like your file format is inconsistent. Any language will be fickle when the incoming data is difficult to parse. Do you have a way of determining whether column 2 will contain embedded whitespace? That's the key question here. | |
Re: Let's start with the design of the class. timer aTimer; aTimer.Start(); This is kind of an equivalent design issue, but in many cases one would want the timer to start immediately without having to explicitly call Start(). Perhaps a constructor parameter that tells it to start or not? while( aTimer.GetTicks() … | |
Re: > But what if unknown coder is smart enough to change hidden data of class? Then unknown coder will be breaking the contract and if the hidden data of the class ever changes, will suffer the consequences of not strictly using the public interface provided by the class author. I … | |
Re: Sounds like a CAPTCHA failure. You should be able to refresh the images to get something you can easily recognize. CAPTCHAs are used to restrict registration to actual humans and reject bots. | |
Re: I'd probably go with a simple licensing mechanism: using System; using System.Globalization; namespace BasicLicense { public class License { public string ProductCode { get; set; } public DateTime ExpiresOn { get; set; } public bool IsValid { get; set; } public License(string licenseCode, string productCode, string registeredTo) { ExtractLicense(licenseCode, productCode, … | |
Re: Please elaborate on what these "errors" are. | |
Re: Two options. One is a verbatim string: var query = @"select beggining_school, end_school FROM Student,student_weekend,Weekend WHERE Student.ID=student_weekend.studentID AND student_weekend.WeekendID=Weekend.ID" Note that indentation is significant in the string, as are newlines. The other, my preference, is literal concatenation because there aren't any "hidden" characters: var query = "select beggining_school," + "end_school … | |
Re: [Isolated Storage](http://msdn.microsoft.com/en-us/library/3ak841sy(v=vs.110).aspx). It's not completely protected from user access, but not as open as arbitrary files. | |
Re: If you find yourself naming variables with incrementing numbers, use a list: List<Person> peepls; | |
Re: http://www.lysator.liu.se/c/bwk-tutor.html Do you have anything specific you're interested in or just C in general. | |
| |
Re: > INLINE FUNCTIONS DON'T USE STACK. THEREFORE, EXECUTION TIME IS LESS.HOWEVER, THE STATEMENTS IN THE FUNCTION ARE SUBSTITUTED WHENEVER THE FUNCTION IS CALLED.INLINE FUNCTIONS ARE ALWAYS SHORT. Many assumptions there, tamilselvi, and none of them are safe: http://www.gotw.ca/gotw/033.htm | |
![]() | Re: MASM is just an assembler, IIRC. Are you also running a linker after assembling source into object code? ![]() |
Re: > I can't figure out how to clear the "MathDep" - previous collection of items before importing the collection of items again. MathDep.Clear() Since you're using a hardcoded collection, you can just clear `MathDep` when you clear `ListBox1.Items`. | |
Re: > manually I get the answer as 6 , but the compiler gives as -4 . how? Because modifying a variable multiple times between [sequence points](http://en.wikipedia.org/wiki/Sequence_point) is undefined behavior. The compiler can do whatever it wants. Further, upon invoking undefined behavior, the entirely of the program is henceforth undefined as … | |
Re: What are the contents of `findNum`? That's somewhat critical as to your results. However, it strikes me that you'd want to split it into two loops to get a more reader friendly output: cout << "Positive: "; for (int i = 0; i < num; i++) { if (findNum[i] > … | |
Re: > Only char has a guarenteed size, which is 1 byte with a range of -127 to 126. Off by one. The guaranteed size is -127 to 127. | |
Re: I can think of several ways to do this, but more detail would help. What is this algorithm ultimately doing? Describing what you want to accomplish rather than *how* you want to accomplish it works better when looking for alternative methods. | |
Re: How many buttons on average are you generating? | |
Re: Please ask a [smart question](http://www.catb.org/~esr/faqs/smart-questions.html). Just posting your homework assignment is insufficient. | |
Re: > We use it at my company, but it doesn't get any more work done than the less "structured" methods we used in my previous position Agile is a buzzword for a red tape process. The more red tape you have, the longer it takes to get shit done, regardless … | |
Re: [Do provide evidence of having done some work yourself if posting questions from school or work assignments](http://www.daniweb.com/community/rules) | |
Re: Let's start with one quick clarification, XML is a *text* format. So technically you can save XML to a .txt file. ;) > I just can t see xml being a advanced technology for data saving and transportation. That's because it's not. XML isn't the most human readable format out … | |
Re: Good luck. Feel free to ask for help when you have a question other than *nothing at all* or "I don't know where to start". :rolleyes: | |
Re: > I have done something but got confused along the line. Don't you think it would be better to post what you've done and then explain the confusion you have rather than just post your assignment and hope someone can read your mind? | |
Re: This is a quirk of the C++ object model. Since the member function isn't virtual, the compiler knows exactly what function to call and doesn't depend on the object instance being valid. Technically, all non-virtual member functions are shared under the hood (virtual member functions work through a lookup table … | |
Re: Headers provide declarations for the library objects and types you use. C++ requires a declaration to exist, and because it would be a pain (not to mention non-portable) to declare things manually, the headers are provided to make your life easier. | |
Re: Since you're posting to a C++ forum, I'm assuming you know at least rudimentary C++. So the good news is that when you need a program, you can write it. The bad news is that we won't write it for you. That would be cheating at what is clearly homework. | |
Re: > Any replies ??? Clearly not. :rolleyes: Please don't bump your posts, it's rude. | |
Re: I wouldn't recommend using `%s` unless you can guarantee that the fields won't contain embedded whitespace. Further, you should always use a field width for string specifiers in `scanf` to avoid buffer overflow. Ignoring the possibility of quoted fields that contain embedded tabs, it's straightforward to read a line with … |
The End.