Software Development
Member Avatar

Hi here is my code,can someone help to edit the directory.getfile(),so i could output all files in c:\ Windows ?

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text; …
Software Development
Member Avatar

Hi here is my code,can someone help to edit the directory.getfile(),so i could output all files in c:\ Windows ?

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text; …
Topic by PulsarScript

You can use System.IO.Directory.GetFiles(DIRECTORY_NAME); which will return an array of strings that contain all the files (with full path) in that folder.

Game Development
Member Avatar

So I'm making a map editor with C# and XNA. I have currently got it setup so there is a windows for with a picture box, which the game is …

Game Development
Member Avatar

So I'm making a map editor with C# and XNA. I have currently got it setup so there is a windows for with a picture box, which the game is …

Topic by CJMW

I know this is a bit late and you may have come up with a solution already but here is a method you could use.

pbGameBox is a PictureBox object …

Software Development
Member Avatar

Hi, I need to use getopt for a program called like myprogram.c file1 file2 file3 -t. Now I've read some examples about how to use switch cases for options with …

c
Software Development
Member Avatar

Hi, I need to use getopt for a program called like myprogram.c file1 file2 file3 -t. Now I've read some examples about how to use switch cases for options with …

Topic by choconom

I am not a Unix/Linux user so I am not 100% sure but after reading on GetOpt here and a GetOpt example here I would say the short answer is …

c
Software Development
Member Avatar

I am trying to create a recursive function:

double fifthRoot(double x, double maxError)

In this function, I have to return y such that y^5 will be within maxError of x. …

c++
Software Development
Member Avatar

I am trying to create a recursive function:

double fifthRoot(double x, double maxError)

In this function, I have to return y such that y^5 will be within maxError of x. …

Topic by andrew mendonca

Line 18 of what you posted makes no sense. It will always select maximum = maximum in the trinary operator and you cannot declare a variable equal to an undeclared …

c++
Software Development
Member Avatar

Hello DaniWeb community! I am trying to learn c# by going through a few tutorials on how to make an RPG game game using windows form, but I cant seem …

Software Development
Member Avatar

Hello DaniWeb community! I am trying to learn c# by going through a few tutorials on how to make an RPG game game using windows form, but I cant seem …

Topic by gangsta gama

I would suggest that you do not try to store all your information in labels, but rather have seperate variables that control the amount of each stat that your character …

Software Development
Member Avatar

Hello ,

I want to scan each row and find in each column the max element and the corresponding index.
Then , swap this column with the column which belongs …

Topic by glao

Just a question.
Could you tell me how you thought this:

a[maxIndex] = a[r*N + r];

I mean the index r*N + r.
...

c
Software Development
Member Avatar

Hello ,

I want to scan each row and find in each column the max element and the corresponding index.
Then , swap this column with the column which belongs …

c
Software Development
Member Avatar

Hello ,

I want to scan each row and find in each column the max element and the corresponding index.
Then , swap this column with the column which belongs …

Topic by glao

Not sure why you are switching values in the b array or why your swap function uses loops.

#include <iostream>
using namespace std;

int main()
{
    const int N = …
c
Software Development
Member Avatar

m nt understanding how can i make main of a class

c++
Software Development
Member Avatar

m nt understanding how can i make main of a class

Topic by hira_5

Do you mean the constructor?

You make a public function within the class that has no return (not void) and also has the same name as the class.

#include <iostream> …
c++
Software Development
Member Avatar

Okay, so this is my current code:

#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>

struct Display {

     int width;
     int height;
     char **array;
};

struct Display *display_create(int width, int height) { …
Software Development
Member Avatar

Okay, so this is my current code:

#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>

struct Display {

     int width;
     int height;
     char **array;
};

struct Display *display_create(int width, int height) { …
Topic by krieg

Line 17 should be display->array = (char **) malloc(sizeof(char*) * height);
Note that it is sizeof(char*) not sizeof(char) because you are trying to allocate char pointers which have a size …