[QUOTE=vexx21322;34749493]C#
I'm trying to delete a file with the confirmation dialog. I searched around and found that I can use Microsoft.VisualBasic.FileIO.FilesSystem. The problem is that this namespace doesn't exist for me.
Am I doing something stupid or?[/QUOTE]
Are you asking about deleting a file, or showing the dialog?
For deleting, you can use the File class found in System.IO. For the dialog, there are some controls for this in System.Windows.Forms.
[QUOTE=thomasfn;34749831]Are you asking about deleting a file, or showing the dialog?
For deleting, you can use the File class found in System.IO. For the dialog, there are some controls for this in System.Windows.Forms.[/QUOTE]
I'm asking about how I can use the FileIO namespace.
I just want to delete a file from my program where it looks like the normal delete when you do it from explorer.
Still having problems with link errors, added these references too the link list and its cleared up a lot of the errors but I'm still left with one. I added these:
sfml-system-s-d.lib
sfml-window.lib
sfml-graphics.lib
and im left with this error. Error 1 error LNK1104: cannot open file 'sfml-window.lib'
sfml-main.lib
sfml-window-d.lib (can have -s) (remove -d for release mode)
sfml-graphics-d.lib (can have -s) (remove -d for release mode)
sfml-system-d.lib (can have -s) (remove -d for release mode)
[QUOTE=ief014;34750846]sfml-main.lib
sfml-window-d.lib (can have -s) (remove -d for release mode)
sfml-graphics-d.lib (can have -s) (remove -d for release mode)
sfml-system-d.lib (can have -s) (remove -d for release mode)[/QUOTE]
What do i have for, Active(Debug) and Debug?
Im trying to setup a new repo on dropbox, this time on windows but when it come to pushing this happens:
[IMG]http://i.imgur.com/IfSnr.png[/IMG]
Anyone have any ideas?
[QUOTE=Richy19;34751110]Im trying to setup a new repo on dropbox, this time on windows but when it come to pushing this happens:
[IMG]http://i.imgur.com/IfSnr.png[/IMG]
Anyone have any ideas?[/QUOTE]
git push -u dropbox master
Adding the '-u' allows you to do just git push in the future.
[editline]18th February 2012[/editline]
The problem was that you didn't specify what heads/refs to push, which is supposed to be the master branch.
Is this the correct approach to adding vectors or is there a simpler way?
[CODE]static int[] addVector(int vector1[], int vector2[]){
int size = vector1.length;
int newVector[] = null;
for(int i = 0; i < size; i++){
newVector[i] = vector1[i] + vector2[i];
}
return newVector;
}[/CODE]
you need to instantiate the array
[QUOTE=Jimmylaw;34750950]What do i have for, Active(Debug) and Debug?[/QUOTE]
For Release, you want:
[code]sfml-window.lib
sfml-graphics.lib
sfml-system.lib[/code]
For Debug, you want:
[code]sfml-window-d.lib
sfml-graphics-d.lib
sfml-system-d.lib[/code]
If you want to link statically, add -s to all of them (for example, sfml-graphics-s-d.lib).
[QUOTE=Chris220;34754332]For Release, you want:
[code]sfml-window.lib
sfml-graphics.lib
sfml-system.lib[/code]
For Debug, you want:
[code]sfml-window-d.lib
sfml-graphics-d.lib
sfml-system-d.lib[/code]
If you want to link statically, add -s to all of them (for example, sfml-graphics-s-d.lib).[/QUOTE]
Just as a question, what's the advantage of using debug .libs? How does it help with debugging your own program?
-snip-
[QUOTE=sim642;34758695]Just as a question, what's the advantage of using debug .libs? How does it help with debugging your own program?[/QUOTE]
I think, when you use debug libs, it's easier to find any bugs which occur in SFML when you're working on your program.
[QUOTE]If you want to link statically, add -s to all of them (for example, sfml-graphics-s-d.lib).[/QUOTE]
And if you're doing this, define SFML_STATIC too!
[QUOTE=NovembrDobby;34759991]And if you're doing this, define SFML_STATIC too![/QUOTE]
I've never actually done this, what does it change?
What's the name of the visual studio extension that shows the entire page of code on the right and a box highlighting what section of code you are looking at right now?
[QUOTE=Chris220;34760133]I've never actually done this, what does it change?[/QUOTE]
It won't link properly without it for me.
[QUOTE=NovembrDobby;34760783]It won't link properly without it for me.[/QUOTE]
Odd... you compiled the sources yourself I take it?
Didn't want to make a thread to post this, so I figured I'd post it here:
The current Humble Bundle has finally inspired me to make an actual attempt to learn a language (I'd been wanting to do this for much, much longer, but I think I'm going to actually go at it now).
After reading [url=http://www.gamefromscratch.com/post/2011/08/04/I-want-to-be-a-game-developer.aspx]this article,[/url] I've decided on either learning Lua or Python. I'd use Lua since that's the only thing I have a modicum of experience in, but I'm mostly afraid of how unsupported it is at the moment; there are only a handful of places where you can apply Lua, and I'm afraid everything that I learn will only be useless to me in the future. I'm a bit scared of Python because I blindly think it's going to be more complex than Lua just because I don't know anything about it, but I know it is much more widely supported than Lua.
I'm trying to look at things as realistic as I can, and I think the best way for me to start any attempt to work on a game in the future is to do a good job at learning the syntax, and take baby steps by making shit pong-tier games and maybe one day I'll work my way up to shmups. In the end I'll be happy as long as it's a hobby I can adopt, and make progress with.
tl;dr no experience whatsoever and i want what i learn to not be totally worthless to me in the future, Lua or Python?
[cpp]#include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::endl;
using std::string;
int main()
{
cout << "What is your name? " << endl;
string name;
cin >> name;
const string greeting = "Hello, " + name + "!";
cout << "How many spaces?" << endl;
int pad;
cin >> pad;
const int rows = pad * 2 + 3;
const string::size_type cols = greeting.size() + pad*2 + 2;
cout << endl;
for (int r = 0; r != rows; ++r){
string::size_type c = 0;
while (c != cols) {
if (r == pad + 1 && c == pad + 1) {
cout << greeting;
c+= greeting.size();
} else {
if (r == 0 || r == rows - 1 || c == 0 || c == cols - 1)
cout << "*";
else
cout << " ";
++c;
}
}
cout << endl;
}
system("pause");
return 0;
}
[/cpp]
Basically a modification of a program in C++, but I want to know a few things:
1. What exactly does this do for the program in terms of it's job? [code]for (int r = 0; r != rows; ++r){[/code]. Why do I need to define what r is? I know how it works, but what's the point of seeing whether the # of rows is 0?
2. If r and c are going to be 0, what's the point of checking whether # of rows is 0? Isn't that a bit useless?
[QUOTE=Flubadoo;34770298][cpp]
Basically a modification of a program in C++, but I want to know a few things:
1. What exactly does this do for the program in terms of it's job? [code]for (int r = 0; r != rows; ++r){[/code]. Why do I need to define what r is? I know how it works, but what's the point of seeing whether the # of rows is 0?
2. If r and c are going to be 0, what's the point of checking whether # of rows is 0? Isn't that a bit useless?[/QUOTE]
It doesn't check if r is 0; the single equals sign assigns 0 to r. So it's really saying r starts at 0 and increments whenever it isn't equal to rows.
[QUOTE=NovembrDobby;34760783]It won't link properly without it for me.[/QUOTE]
[QUOTE=Chris220;34760133]I've never actually done this, what does it change?[/QUOTE]
Didnt they change it recently so that you have to define SFML_DYNAMIC?
either way I define dynamic if im using dll and static if using static
[QUOTE=Octave;34770471]It doesn't check if r is 0; the single equals sign assigns 0 to r. So it's really saying r starts at 0 and increments whenever it isn't equal to rows.[/QUOTE]
So while r is not = to rows, it increments the value of r, but why is that necessary?
[QUOTE=Richy19;34771263]Didnt they change it recently so that you have to define SFML_DYNAMIC?
either way I define dynamic if im using dll and static if using static[/QUOTE]
It used to be SFML_DYNAMIC, but it was changed to SFML_STATIC. I remember it because this change affected my programs.
[QUOTE=Flubadoo;34771564]So while r is not = to rows, it increments the value of r, but why is that necessary?[/QUOTE]
It's a loop, so while the value is not equal, then it will increment the value and then run the loop. So if row = 5, then it will run everything inside the loop 5 times, with r equaling 0,1,2,3,4.
[QUOTE=WTF Nuke;34771771]It's a loop, so while the value is not equal, then it will increment the value and then run the loop. So if row = 5, then it will run everything inside the loop 5 times, with r equaling 0,1,2,3,4.[/QUOTE]
But why is it necessary in the context of the program? When figuring out the number of rows, how does it add anything to it?
[QUOTE=n0cturni;34766347]:words:[/QUOTE]
If you truly want to start, I would go with C++. Why? For making games, it's the most used right now, and if your priority is learning a language that you can use for a job or something in the future, it's your best bet. While C++ does have quite a steep learning curve, it is nothing a beginner can't handle if they take baby steps.
Personally right now I think you are sort of afraid of programming so you want to take a really easy language, but that wouldn't fit to what you wanted.
[sp] Of course you could do Lua or Python and THEN move on to C++, but you said that you didn't want to "waste" your time learning a language if you aren't going to use it for a job in the future. [/sp]
Well, I don't necessarily need it for a job; I just want to be able to use it later on - I don't want it to become a "dead" or "unused" language 2 to 5 years from now.
[QUOTE=n0cturni;34772733]Well, I don't necessarily need it for a job; I just want to be able to use it later on - I don't want it to become a "dead" or "unused" language 2 to 5 years from now.[/QUOTE]
I'm pretty sure Python or Lua aren't going to be dead in a few years, they still have a massive amount of people using them, and the numbers are growing.
Really passionate about it? Go with C++.
Still not so sure, or want to try it out before going to something serious? Python [sp] or Lua if you want to be able to do stuff in Garry's Mod too. [/sp]
Here's a little taste of what C++ is like at the very first stages (watch these videos and a few more after):
[video=youtube;tyVhn0FWWB4]http://www.youtube.com/watch?v=tyVhn0FWWB4[/video]
These are links because I don't want to stretch the page:
[URL="http://www.youtube.com/watch?v=XFQ9dw3CyDo&feature=relmfu"]Number 2[/URL]
[URL="http://www.youtube.com/watch?v=EwvfBtC1nL4&feature=channel"]Number 3[/URL]
[URL="http://www.youtube.com/watch?v=wP6rY96KEf0&feature=relmfu"]Number 4[/URL]
Is it possible in XNA to load an image from the hard drive, not from the Content files and still get the file as a Texture2D.
Sorry, you need to Log In to post a reply to this thread.