588 Posted Topics
Re: [B]>>Don't use System("pause"), instead as LordNemrod suggested use cin.get(). [/B] Yes, [URL="http://www.gidnetwork.com/b-61.html"]never use System("pause")[/URL]. | |
Re: >>[I]"N_showdata.N_enterData();" which says "error C2660: 'NomineeData::N_enterData' : function does not take 0 arguments"[/I] It means exactly what it says. | |
Can someone explain why this: [code=xml] <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:stretchColumns="1"> <TableRow android:id="@+id/upcoming1" android:clickable="true"> <<<< <TextView android:text="-------" android:gravity="left" android:padding="3dip" />[/code] Doesn't allow me to click the row? edit> Maybe the more important question. How can I fetch it using onClick or something similar? e.g., [code=java] TableRow tr … | |
Re: Hey Tom, you can do this two ways. The easiest way would be to use a vector instead of an array: [code=c++]vector<Node> Tom(5, Tom(width)); //5 Tom objects calling Tom(width)[/code] The other way, if you want to (a) specify the parameters for each object or (b) continue using arrays: [code=c++]Node Tom[5] … | |
Re: I would also suggest sticking with arrays for now, especially since you have a set index. Something like this might get you going: [code=c++] int num = 0; string ary[25] = {"One", "Two", "Three", ... , "Twenty-Five"}; cout << "Give me a number: " << flush ; cin >> num; … | |
Re: [QUOTE][B]>If they want me to take a course, which will cover a bunch of stuff I already know, then that's what I'll do.[/B] Just don't let them make you pay for it. They're the ones who want you to take a course, despite hiring you for your programming prowess. If … | |
Re: I practically [URL="http://www.daniweb.com/forums/post1321810.html#post1321810"]gave you the answer[/URL] to this problem already (without the use of pointers and dynamic memory). Does your assignment require that you use pointers? | |
Re: Ok, so: #1 - What you're experiencing is due to something called early (static) binding. At run time, your compiled code has no clue about basePtr pointing to derivedObject. This is one reason you use virtual functions. If you noticed, your last function call did actually call the derived function … | |
Re: Your question doesn't make any sense! How are the values in the matrix generated? What are you trying to do? | |
Re: Look [URL="http://www.cplusplus.com/doc/tutorial/arrays/"]here[/URL]. | |
Re: @embooglement: Unless the o/p has an application that requires this type of encapsulation or abstraction - in which case, simply calling from main() won't work. @o/p: I wouldn't avoid this type of design for the sake of preserving your [URL="http://en.wikipedia.org/wiki/Stack-based_memory_allocation"]stack[/URL], assuming it's because you're trying to maintain OOD. You'll see … | |
Re: Unless 6.0 is required, go [URL="http://www.microsoft.com/express/downloads/#2010-Visual-CPP"]here[/URL] and select Visual C++. That is the newest version of Visual Studio. | |
Re: You haven't corrected it. Take another look at firstPerson's post. You can implement your function just like you did the other three. [code=c++] bool checkGuess(int ans, int guess) { if ( ans != guess ) return false; else return true; }[/code] | |
Re: [URL="http://www.lmgtfy.com/?q=c%2B%2B+2010+free+download"]Google[/URL]. | |
Re: So the only thing you want is the last line of the file I assume... since your while() loop will not break until reaching the end of your file. | |
Re: You could save the values to a file each time. Then use a function to read those values, and determine the Count you want to display. | |
Re: Using the ++ operator on a pointer is different from a traditional variable. *ptr++ will increment the memory space which ptr is pointing to based on the variable type. For example, if you have [code=c++]int *ptr;[/code]and suppose it's pointing at memory location 1000. We know that an integer is 4 … | |
Re: Hey Arthas - have you tried logging on to the [URL="http://www.boost.org/community/irc.html"]Boost IRC channel[/URL]? They have quite a few people who are always logged on. That's where I found most of my help. | |
Re: Just use a break and loop like Fbody suggested. e.g., [code=c++] int answer = 1; while (answer >= 1 && <= 4) { switch (answer) { case 1: { cout << "what do you want to do?\n"; cin << answer; break; } case 2: { //do stuff cout << "what … | |
Re: Have a look [URL="http://www.boost.org/"]here[/URL]. | |
Can someone remind me why I can't do this: [code=c++] int s = b.Activate(war.get_tp(), damage, 50); //prototype int Activate ( int &tp, int weaponDamage, int attack ); [/code] I get an error at war.get_tp(). It says cannot convert param 1 from int to int&. I need it to be a … | |
Re: My favorite beginner C++ book has always been [B]C++ Programming: From Problem Analysis to Program Design[/B], by D.S. Malik. | |
Re: You're not passing the whole array. The compiler (usually) passes by reference when dealing with arrays... whether or not you specify it that way. | |
Hey guys, I can't install gpmc because it says some .NET framework is required.... | |
Hey guys, I'm getting this error: [quote]1>GoblinRecruit.obj : error LNK2019: unresolved external symbol "public: void __thiscall Mob::set_data(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,int,int,int,int,int,int,int,int)" (?set_data@Mob@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHHHHHHH@Z) referenced in function "public: __thiscall GoblinRecruit::GoblinRecruit(void)" (??0GoblinRecruit@@QAE@XZ) [/quote] When I try to run this section of code: [code=c++] #include "Standard Libs.h" #include "Ability.h" class Mob { private: string … | |
Re: Um... we don't do homework. We've been through school already. You have to at least attempt to answer these yourself before you can expect [B]any[/B] help from us. | |
Re: C++ with Boost. Hop on the BOOST IRC chat channel - there are tons of people always logged on. They're usually willing to help if you have questions. | |
For whatever reason, I can't figure this out. I'm getting this error: [quote]error C2082: redefinition of formal parameter 'user' [/quote] In this code: [code=c++] #pragma once #include "Standard Libs.h" #include "Ability.h" #include "Spell.h" #include "Item.h" class Adventurer { private: string name; int level; int xp; int gold; int attack; int … | |
i just got a dell precision 390 and put a Geforce 7950GT in it for my gaming needs. sometimes after leaving the computer idle for like 12 hours i'll come back and my monitor will just show a sort of static but not quite as scrambled, with a lavender color … | |
Re: Have a look [URL="http://www.daniweb.com/forums/post1284058.html#post1284058"]here[/URL]. Also, maybe try [URL="http://tinyurl.com/26w98qv"]this[/URL]. Hope it helps | |
Re: How are you filling the data grid? Are you doing a SELECT * or some other query? | |
Re: VLSM can be very challenging for new networkers. What you're doing is essentially subnetting subnets. So for your example, if I understand it correctly, you have the following: HQ - 13 computers OUs - 39 computers/ea. So to start, you want to being with the subnet that will require the … | |
| |
Re: [URL="http://www.homeworkhelp4u.com/cpp_programming_homework_help.html?gclid=CO_Nq4jqi6MCFRBx5QodJho9eA"]I think this is what you're looking for[/URL]. | |
Re: To add to this, I will often not capitalize anything else in my program other than classes. And two word classes are multiple capitals (e.g., DogHouse, BankAccount, etc.) [code=c++] int dogHouse // variable ... class DogHouse // class ... dog_house() // function ... [/code] I have a tendency to not … | |
Hey everyone, I'm starting a new job on Monday, and I asked if there were any topics I should re-familiarize myself with. Along with the typical data structures, they also mentioned STL. I'm not sure that we ever used STL during my college work (like most classes I assume, we … | |
Re: Alternatively, you can use the express version of [URL="http://www.flexerasoftware.com/products/installshield/editions.htm"]InstallShield [/URL]- makes for very professional looking apps and I'm pretty sure it's free. | |
Is there a way to automatically be subscribed to threads I start? | |
Hey everyone, I try to contribute as much as I can on here, but I also asked a lot of questions. It would be really cool to have the option to auto subscribe to threads started by me, without having to auto subscribe to threads I reply to also. Just … | |
Re: Not sure of your requirements as far as compilers go, but have you tried looking into [URL="http://www.microsoft.com/express/Downloads/#2010-Visual-CS"]C#[/URL]? *prepares flame shield* From my experience, unless I'm writing financial software or guiding missiles down chimneys, I prefer C# for anything GUI based. However, you may have a restriction against this for some … | |
Re: Maybe try something along the lines of [code=c++] if (num % 10 == 0) cout << "0" ; //reverse number code [/code] | |
Re: [URL="https://learningnetwork.cisco.com/index.jspa?ciscoHome=true"]Brushing up for the test. [/URL] As far as universities - you'll have to decide that. | |
Re: Just skimming through posts here - really think someone should write a code snippet with all of this in it. Very good material and explanations here! | |
Re: If you're referring to a prompt (like a show dialog), there are no built in functions for that (to my knowledge). You'll need to add a new form to your program, and display that form as the "input prompt" and then either pass the values back to your main form, … | |
Re: I'm sorry, I don't have an answer to your question... I did literally "lol" at this though... :D [quote]"http://127.0.0.1/gimmemore.mp3"[/quote] Good luck! | |
Re: I'm sure there are better ways to do this, but here's a short tutorial I wrote a couple of weeks ago on [URL="http://www.daniweb.com/code/snippet290540.html"]databases[/URL]. Hope this helps | |
Re: Here's an excerpt from one of my programs - maybe this will help also. [CODE=c#]log.LogMessageToFile("---> Laptop checkout started <---"); DataGridViewRow row = dataGridView_Laptops_Available.SelectedRows[0]; //get selected row int laptop_id = Convert.ToInt32(row.Cells[0].Value); //use primary key to determine item log.LogMessageToFile("Laptop ID set to " + laptop_id.ToString()); Form_CheckOut form_CheckOut = new Form_CheckOut(); form_CheckOut.Owner = … | |
Re: I would assume [B]RANDOM FILES[/B] is probably in the glossary of your textbook. You can probably find the associated page number in the [B]INDEX[/B]. Hope this helps. |
The End.