679 Posted Topics
Re: Oh wow, [URL="http://en.wikipedia.org/wiki/Legend_of_the_Red_Dragon"]L.O.R.D.[/URL] has come flooding back to me... have a look at that for some inspiration; I remember it as being pretty nifty, back in the day. You also might wander through the [URL="http://www.ifarchive.org/"]IF Archive[/URL]; there are a lot of interesting text games and articles on game design in … | |
Re: [QUOTE=danethepain83;1665037]I am passing to the function a list, such as '(1 2 3), and I need the function to return seperate lists, such as '(1)'(1 2)'(1 2 3).[/QUOTE] It's not entirely clear what you want. Are you trying to return all possible sublists, so that [ICODE](sublists '(1 2 3))[/ICODE] returns … | |
Re: [QUOTE=marceta]Hi guys, im workin on a little text based RPG using c++. It is a win32 comsole application and i am wondering what i could do to improve it! ...[/QUOTE] It's always great to see someone working on text-based games! It looks like you have a decent start on a … | |
Re: A simple [URL="http://msdn.microsoft.com/en-us/library/system.string.split(v=VS.100).aspx"]Split[/URL] is fine if all you have to do is split at the underscores and pass the parts off to date/time parsers, but it starts to get messy if you have to do more text manipulation after the split. This might be slightly overkill for the posted problem, … | |
Re: Like this: [CODE] #include<stdio.h> #include<conio.h> int n, a[10]; void display(); void insert(int); int del(); int main() { int i, item = 0, j; n = 1; printf("enter the numbers:"); for(i = 1; i < 6; i++) scanf("%d", &a[i]); for(j = 1; j < 5; j++) { insert(a[j+1]); } display(); while(n … | |
Re: [url]http://en.wikipedia.org/wiki/Compiler[/url] Follow links; read. | |
Re: Once you have an [URL="http://msdn.microsoft.com/en-us/library/xbe1wdx9.aspx"]Assembly[/URL] object to work with (for example, loaded with [URL="http://msdn.microsoft.com/en-us/library/system.reflection.assembly.load(v=VS.100).aspx"]Assembly.Load[/URL]), then you can call [URL="http://msdn.microsoft.com/en-us/library/system.reflection.assembly.gettypes.aspx"]GetTypes[/URL] on the assembly object to get all of the classes and structs defined in the assembly. Then you call [URL="http://msdn.microsoft.com/en-us/library/system.type.getmembers(v=VS.100).aspx"]GetMembers[/URL] on each type to get its constructors, events, fields, methods, properties, … | |
Re: The second parameter to the [ICODE]Timer[/ICODE] constructor you're using needs to implement [URL="http://download.oracle.com/javase/1.4.2/docs/api/java/awt/event/ActionListener.html"][ICODE]ActionListener[/ICODE][/URL]. [URL="http://download.oracle.com/javase/6/docs/api/javax/swing/JFrame.html"][ICODE]JFrame[/ICODE][/URL] doesn't implement it, so you'll have to do that in your [ICODE]Morning[/ICODE] class yourself. Also: You'll get better results posting questions like this in the [URL="http://www.daniweb.com/software-development/java/9"]Java forum[/URL]. | |
Re: If you're using Visual Studio, I recommend you use its features rather than trying to make an end run around the system. This will help you avoid future headaches. In VS2008, the "Add" submenu isn't where you add a reference. Right below it, you should see an "Add Reference..." menu … | |
Re: Inside [ICODE]drawCube[/ICODE], comment out this line and see what happens: [CODE] glTranslatef(225.0f, 225.0f, 0.0f); [/CODE] Some other things you might consider: [LIST] [*]GLUT already includes [ICODE]gl.h[/ICODE] and [ICODE]glu.h[/ICODE], so you don't need to include them yourself. [*]In [ICODE]display[/ICODE], why are you calling [ICODE]glEnd[/ICODE]? There's no matching [ICODE]glBegin[/ICODE]. [*]Why does [ICODE]read_file[/ICODE] … | |
Re: Your compiler should have an "output to assembly" option; for GCC, this is "-S" | |
Re: Use code tags, please! using (SqlDataReader reader = cmd.ExecuteReader()) if (reader.Read()) SearchingDate = (DateTime)reader[0]; If that third line is setting `SearchingDate `to the current date and time, then that must be the value in the first row and column of your data. The actual current date and time only comes … | |
Re: The problem is in this line: [CODE] GLint numstrip, numlines, x, y; [/CODE] You're declaring [ICODE]x[/ICODE] and [ICODE]y[/ICODE] as integer variables, but the values in your text file are decimals. Try declaring your variables like this: [CODE] GLint numstrip, numlines; GLfloat x, y; [/CODE] That got it to draw something … | |
Re: [url]http://en.wikipedia.org/wiki/Header_file#Motivation[/url] | |
Re: [QUOTE=theCompiler;1658281] [CODE] int midpoint (int x, int y) { x=2*(x1+x2); y=2*(y1+y2); } [/CODE] i cant run my program i think there's a problem in the function midpoint but i cant figure it out [/QUOTE] Also, that's not how you calculate a [URL="http://en.wikipedia.org/wiki/Midpoint"]midpoint[/URL]. You should divide by two, not multiply. ![]() | |
Re: [URL="http://en.wikipedia.org/wiki/Parallel_computing"]Parallelization[/URL] can be complicated. Some things can't be parallelized, and it can be difficult to extract the parallelizable parts from existing sequential code. I can't offer anything too specific without knowing what your algorithm is, but since it's an image processing job, I imagine you at least might be able … | |
Re: In my opinion, it doesn't matter which language you choose. The challenges and problems you will face are going to be independent of the implementation language. The major difference between languages as they relate to graphing functions will be in how you draw the graph and show it to the … | |
Re: I'm sure there are plenty of members that can help. We'll be the most helpful if you post specific questions that come up as you're working something out. For general coding questions, you'll get the best results from posting in the [URL="http://www.daniweb.com/software-development/csharp/61"]C#[/URL] or [URL="http://www.daniweb.com/software-development/vbnet/58"]VB.NET[/URL] forums, depending on which language you're … | |
Re: [QUOTE=radhika kotecha;1616042]Hello, I am working with genetic programming for classification techniques in data mining. I am not very much clear about how to perform genetic programming in C. Can i please get some sample code of genetic programming... An example program for any application would be fine. I just need … | |
Re: [QUOTE=neptali;1645506]I've use to create this in Turboc++ 3.0 and there are four linker error how could i fix this?[/QUOTE] What are the linker errors? Please post them; it helps us help you faster, especially if we don't have Turbo C++ ourselves. If I were to guess, I'd say you're missing … | |
Re: {0} is the placeholder for the first argument after the format string, {1} is the second, and so on. For example, [ICODE]Console.WriteLine("{0}, {1}", "bleh", 53);[/ICODE] would result in this line being written: [ICODE]bleh, 53[/ICODE]. This is called [URL="http://msdn.microsoft.com/en-us/library/txafckwd.aspx"]composite formatting[/URL] in .NET-land. | |
Re: [QUOTE=kartik14;1642881]Is there any way to "clear" work space in Lua similar to the [ICODE]clear [/ICODE]command in Matlab ?[/QUOTE] There's not a built-in function to do that. Offhand, I think the simplest thing to do would be to run through the [URL="http://www.lua.org/manual/5.1/manual.html#pdf-_G"]global environment[/URL], setting everything to [ICODE]nil[/ICODE]. You'd have to be … | |
Re: [QUOTE=kartik14;1642107]Hi, I would like to know the significance of lua methods beginning with an underscore.. for example __init().. Thanks !![/QUOTE] The only place I'm aware of that double underscores mean anything to Lua is in [URL="http://www.lua.org/manual/5.1/manual.html#2.8"]metatables[/URL]. Basically they allow you to create custom behavior for certain object; it's an [URL="http://en.wikipedia.org/wiki/Operator_overloading"]operator … | |
Re: Have you even tried to compile this? It won't, for at least five separate reasons. Do that first, and try to fix all of the build errors. Any you don't understand, please post them here and we'll help. | |
Re: [QUOTE=Moschops;1640633]Do you know what the negative of a negative number is?[/QUOTE] [URL="http://en.wikipedia.org/wiki/Negation_(algebra)#Double_negation"]Big hint[/URL]. | |
Re: [QUOTE=fushar;1640230][CODE]while(s<=j){[/CODE] You haven't initialized [B]j[/B] before in your code.[/QUOTE] Yes. Always, always read your compiler warnings! They are trying to tell you something, and very rarely should you ignore them. | |
Re: [QUOTE=Srcee;1627402]When I'm in GET mode, in this line, the program crashes: using (HttpWebResponse responseData = (HttpWebResponse)request.GetResponse()) The information in the catch block says: The remote server returned an error: (403) Forbidden.[/QUOTE] This could be a permissions problem on the Web server... what is the URL you're trying to get, and … | |
Re: [QUOTE=starkk;1636135]segmentation fault...:( some one help me pls.. [/QUOTE] Always, always check your compiler output. Does your compiler report any warnings? Mine does: "[I]warning: 'temp' may be used uninitialized in this function[/I]" at line 28. Your code declares [ICODE]temp[/ICODE] as a [ICODE]char *[/ICODE], and then tries to [ICODE]strcpy[/ICODE] into it without … | |
Re: Also: [URL="http://msdn.microsoft.com/en-us/library/system.string.split(v=VS.100).aspx"]String.Split[/URL] is convenient if you're allowed to use it. | |
Re: [QUOTE=nuclear;1635242]I was watching a tutorial that says that we first need to check if any direction key was pressed, and only then we check which key was pressed, like this: But then i tried to do it wihouth checking if any key was pressed and just jump to the specific … | |
Re: For reference, this is what it's supposed to be doing: [URL="http://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher"]Vigenère cipher[/URL] What programming background do you have? --smg | |
Re: Also: [ICODE]if(a>3<7)[/ICODE] is bogus. Did a warning about it show up when you compiled? | |
Re: Is that code what you were given with this assignment, or does it represent actual work you've done? It's not clear what you want help with--we're not going to do the work for you, but if you've made an effort and have something specific you're stuck on, we're happy to … | |
Re: [QUOTE=Kuroshi;1629530]But what I want to know is what is << doing exactly, I read something about moving the binary number[/QUOTE] [ICODE]<<[/ICODE] is a [URL="http://en.wikipedia.org/wiki/Logical_shift"]left shift[/URL]. From the linked article: "Shifting left by n bits on a signed or unsigned binary number has the effect of multiplying it by 2^n." [QUOTE=Kuroshi;1629530]but … | |
Re: I don't know anything about gltools, but if you have a position and orientation for the camera, you should at least be able to use [URL="http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml"]glTranslate[/URL] and [URL="http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml"]glRotate[/URL] to get the gun to match the camera. | |
Re: [QUOTE=Hendo;1627583]1 For a console app, does .NET need to be installed on a PC to run the app executable?[/QUOTE] Yes, it still runs on the CLR and uses the .NET Framework Class Library. [QUOTE=Hendo;1627583]2 What is the line code to launch an external program? I already have the drive and … | |
Re: Here are some thoughts, in no particular order: [QUOTE=SWORDfreak1;1625338] Next, the crit calculator, which is the same for everyone save the damage that a critical hit does. Players get *3 damage while enemies get *2 damage: the tagi variable is used to randomly generate a number between tagi and tagi … | |
Re: [URL="http://en.wikipedia.org/wiki/Linked_list#Linked_list_operations"]http://en.wikipedia.org/wiki/Linked_list#Linked_list_operations[/URL] | |
Re: [QUOTE=MrAppleseed;1626014]I have a question about C++ GUI's, with Code::Blocks as my IDE. Whenever I make a basic GUI with the Win32 API, it always creates a console _and_ the GUI (as shown in the picture attached). I was wondering how to only create the GUI, or at least make the … | |
Re: [QUOTE=Prankmore;1625272]if anyone could see anything i might have missed in the process it would be much appreciated[/QUOTE] I copied your code in, and it builds, but I also got 37 warnings, for example, "warning: unknown conversion type character 'l' in format" Are you getting these as well? | |
Re: I may be thinking in a slightly different direction than you want to take for this project, but in the interest of development speed and spending more time on the game aspects than language specifics, have you considered using and/or extending a pre-existing embedded language? I'm thinking of [URL="http://www.lua.org/about.html"]Lua[/URL] in … | |
Re: I recommend that you decouple your drawing from the actual framerate. Basically, you keep track of how much time has elapsed since the last frame, and then draw only the part of the waveform that should have been drawn in that amount of time. That way, your framerate can be … | |
Re: If you mean the currently selected item, you should investigate the [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.selecteditem(v=VS.100).aspx"]ListBox.SelectedItem property[/URL]. If you need to look at all of the items in a ListBox, then the [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.items.aspx"]ListBox.Items property[/URL] is where to start. Is that what you meant? | |
Re: [QUOTE=pyTony;1619913]Not using looping could mean recursion or goto label, depending on definition.[/QUOTE] Or you could just put one "round" in a function, and call it 10 times explicitly, returning any information you need to track across the whole game. | |
Re: You could use the [URL="http://msdn.microsoft.com/en-us/library/kwb0bwyd.aspx"]IndexOf[/URL] and [URL="http://msdn.microsoft.com/en-us/library/system.string.substring.aspx"]Substring[/URL] methods to split it instead. If you're feeling adventurous: [URL="http://msdn.microsoft.com/en-us/library/hs600312(v=VS.100).aspx"].NET Framework Regular Expressions[/URL] =) | |
Re: Please post the specific runtime error you're getting and also your code; we can't help if we don't know what you're doing. | |
Re: [QUOTE=zachattack05;1610179]When I need to serialize things to a byte array I usually write the array to a MemoryStream first then use the binary formatter to serialize it to whatever (file, another byte array whatever). The question I had was, can I just serialize a byte array instead of converting it … | |
Re: Do you always get the same error in the same place, or does it change? Is there a specific reason you need to use the clipboard? It might be part of the problem. | |
Re: Two questions: [LIST] [*]What is in your list of project references? [*]What code is in the constructor [ICODE]Form1()[/ICODE]? [/LIST] | |
Re: You only have one counter. If you want to count different values in the array, you need a counter for each value. |
The End.