679 Posted Topics

Member Avatar for ben1996123

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 …

Member Avatar for Cireyoretihw
0
264
Member Avatar for danethepain83

[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 …

Member Avatar for danethepain83
0
2K
Member Avatar for marceta

[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 …

Member Avatar for aramil daern
1
942
Member Avatar for r_james14

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, …

Member Avatar for gusano79
0
94
Member Avatar for gourav1

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 …

Member Avatar for gusano79
0
113
Member Avatar for silvercats
Member Avatar for glut

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, …

Member Avatar for gusano79
0
104
Member Avatar for zach&kody

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].

Member Avatar for stevenwilson
0
407
Member Avatar for sowdust

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 …

Member Avatar for skatamatic
0
263
Member Avatar for scobi

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] …

Member Avatar for scobi
0
169
Member Avatar for chinesethunda

Your compiler should have an "output to assembly" option; for GCC, this is "-S"

Member Avatar for skaa
0
169
Member Avatar for SyncMaster170

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 …

Member Avatar for Mitja Bonca
0
105
Member Avatar for khalid_farooq

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 …

Member Avatar for gusano79
0
617
Member Avatar for Leaningnew
Member Avatar for gusano79
0
176
Member Avatar for theCompiler

[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.

Member Avatar for MonsieurPointer
0
111
Member Avatar for Loony064

[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 …

Member Avatar for gusano79
0
106
Member Avatar for mitchiexlolz

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 …

Member Avatar for Taywin
0
118
Member Avatar for mnewsome

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 …

Member Avatar for gusano79
0
50
Member Avatar for radhika kotecha

[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 …

Member Avatar for TrustyTony
0
250
Member Avatar for neptali

[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 …

Member Avatar for thekashyap
0
167
Member Avatar for techlawsam

{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.

Member Avatar for Mitja Bonca
0
10K
Member Avatar for kartik14

[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 …

Member Avatar for kartik14
0
181
Member Avatar for kartik14

[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 …

Member Avatar for kartik14
0
346
Member Avatar for imraan1992

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.

Member Avatar for gusano79
1
101
Member Avatar for pravin_bug

[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].

Member Avatar for pravin_bug
0
71
Member Avatar for Onlineshade

[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.

Member Avatar for gusano79
0
60
Member Avatar for Srcee

[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 …

Member Avatar for gusano79
0
148
Member Avatar for starkk

[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 …

Member Avatar for starkk
0
454
Member Avatar for coroll

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.

Member Avatar for gusano79
0
140
Member Avatar for nuclear

[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 …

Member Avatar for gusano79
0
283
Member Avatar for robdb

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

Member Avatar for gusano79
-1
2K
Member Avatar for kooletz

Also: [ICODE]if(a>3<7)[/ICODE] is bogus. Did a warning about it show up when you compiled?

Member Avatar for gusano79
0
173
Member Avatar for Nelli71

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 …

Member Avatar for Nelli71
0
163
Member Avatar for Kuroshi

[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 …

Member Avatar for Fbody
0
190
Member Avatar for creekist

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.

Member Avatar for gusano79
0
109
Member Avatar for Hendo

[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 …

Member Avatar for gusano79
0
201
Member Avatar for SWORDfreak1

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 …

Member Avatar for SWORDfreak1
0
199
Member Avatar for Cross213

[URL="http://en.wikipedia.org/wiki/Linked_list#Linked_list_operations"]http://en.wikipedia.org/wiki/Linked_list#Linked_list_operations[/URL]

Member Avatar for Cross213
0
854
Member Avatar for MrAppleseed

[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 …

Member Avatar for gusano79
0
1K
Member Avatar for Prankmore

[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?

Member Avatar for gusano79
0
238
Member Avatar for oamsath

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 …

Member Avatar for gusano79
0
173
Member Avatar for AshfaqueIW

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 …

Member Avatar for mike_2000_17
0
175
Member Avatar for smartjugal

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?

Member Avatar for Mitja Bonca
0
87
Member Avatar for theCompiler

[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.

Member Avatar for sergent
0
289
Member Avatar for saqi1986

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] =)

Member Avatar for Ketsuekiame
0
737
Member Avatar for shanki himanshu

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.

Member Avatar for shanki himanshu
0
179
Member Avatar for zachattack05

[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 …

Member Avatar for zachattack05
0
108
Member Avatar for pablocremita

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.

Member Avatar for gusano79
0
557
Member Avatar for Jennifer84

Two questions: [LIST] [*]What is in your list of project references? [*]What code is in the constructor [ICODE]Form1()[/ICODE]? [/LIST]

Member Avatar for gusano79
0
505
Member Avatar for Sonia11

You only have one counter. If you want to count different values in the array, you need a counter for each value.

Member Avatar for gusano79
0
117

The End.