Is it possible to edit and compile the windows server kernal? if so, how would i go about doing this? I know there's linux and its possible to do that shit to linux in order to optimize it, but I wanna do it with windows.
[QUOTE=FrankPetrov;45241237]Is it possible to edit and compile the windows server kernal? if so, how would i go about doing this? I know there's linux and its possible to do that shit to linux in order to optimize it, but I wanna do it with windows.[/QUOTE]
The Windows NT Kernel is mostly-closed source and propriety. Why would they let you modify and compile the NT kernel for yourself when you can just buy their OS? What would you even want to change? The fact you're asking this question makes me think you probably aren't quite at the level of dicking with kernels quite yet.
[QUOTE=dvondrake;45241819]Can I have a namespace with the same name as a class in C++?[/QUOTE]
After a cursory look over the C++ spec, I see nothing that would prohibit that. I may very well have missed something though (specs aren't exactly renowned for being easy to look through), and some compilers might fail to implement this properly, so why not try it out?
Either way, I don't see why you'd want to do this; it seems like it would easily confuse anyone working with the code, not just the compiler.
[QUOTE=hexpunK;45241885]The Windows NT Kernel is mostly-closed source and propriety. Why would they let you modify and compile the NT kernel for yourself when you can just buy their OS? What would you even want to change? The fact you're asking this question makes me think you probably aren't quite at the level of dicking with kernels quite yet.[/QUOTE]
Nope, I'm most definitely not at the level of dicking with kernels. I was just wondering if its possible because of simply wanting to.
[QUOTE=FrankPetrov;45242462]Nope, I'm most definitely not at the level of dicking with kernels. I was just wondering if its possible because of simply wanting to.[/QUOTE]
Nope. Windows isn't [url=https://gnu.org/philosophy/free-sw.html]free software[/url], so you're pretty much locked out of doing anything like that.
Figured as much. Thanks for answering.
[QUOTE=dvondrake;45241819]Can I have a namespace with the same name as a class in C++?
ie.
[code]
namespace Thing
{
class Stuff
{
};
}
using namespace Thing;
class Thing
{
// use Stuff in here somewhere
};
// use Thing *class* somewhere else afterwards
[/code]
Will this work okay, or will it get confused due to having two types of Thing?[/QUOTE]
Sometimes. It depends on the specific nesting and whether it's possible for the compiler to disambiguate them.
In practice, PLEASE do not ever actually do this. If you absolutely need to do something like this, use static members in the class.
[QUOTE=FrankPetrov;45242462]Nope, I'm most definitely not at the level of dicking with kernels. I was just wondering if its possible because of simply wanting to.[/QUOTE]
It would be pretty interesting to mess around with. Im not too sure what you could actually change that much in the kernel for Windows without possibly breaking everything on top mind :v: Sorry if I sounded overly hostile in that post. It was pretty late and I stopped thinking again.
[QUOTE=hexpunK;45244420]It would be pretty interesting to mess around with. Im not too sure what you could actually change that much in the kernel for Windows without possibly breaking everything on top mind :v: Sorry if I sounded overly hostile in that post. It was pretty late and I stopped thinking again.[/QUOTE]
No, you weren't hostile at all, in fact I expected more people to reply being a complete asshat towards the question. I agree it would most definitely be interesting. I just felt like there has to be some way and wasn't sure if anyone has heard of a way to do it or not.
Does anyone know where I can find a complete overview of the type deduction rules in C++ for each context?
I had seen a presentation by Scott Meyers some time ago where he talked about how type deduction works different for template arguments, universal references, auto, decltype, lambda captures, etc. which is basically what I need to know without finding the video again and taking notes throughout D:
[QUOTE=hexpunK;45244420]It would be pretty interesting to mess around with. Im not too sure what you could actually change that much in the kernel for Windows without possibly breaking everything on top mind :v: Sorry if I sounded overly hostile in that post. It was pretty late and I stopped thinking again.[/QUOTE]
You could add support for a good file system, for example :v:
[editline]29th June 2014[/editline]
Actually, you can still do that with a driver. It seems to be pretty annoying to do though, or at least there I couldn't find a driver for modern Unix file systems.
Yeah if you want to extend Windows functionality, you'll have to learn driver development. If you're knowledgeable in C and have used WinAPI before, the UMDF (user-mode driver dramework) is pretty simple to learn. The new driver framework abstracts the difference between user-mode and kernel-mode reasonably well, making it much simpler to e.g. develop kernel-mode drivers in user-mode.
Microsoft has a few guides on the subject, and MSDN is as useful as always.
[QUOTE=Tamschi;45245473]You could add support for a good file system, for example :v:
[editline]29th June 2014[/editline]
Actually, you can still do that with a driver. It seems to be pretty annoying to do though, or at least there I couldn't find a driver for modern Unix file systems.[/QUOTE]
There are a couple of drivers for Ext3/4 support I think. It's a bit janky and doesn't support writing, but you should be able to read an unencrypted Ext3/4 drive in Windows with them. It's a shame it's not quite as extensible in that area as it could be, NTFS is pretty balls at times compared to more modern alternatives.
[QUOTE=hexpunK;45246567]There are a couple of drivers for Ext3/4 support I think. It's a bit janky and doesn't support writing, but you should be able to read an unencrypted Ext3/4 drive in Windows with them. It's a shame it's not quite as extensible in that area as it could be, NTFS is pretty balls at times compared to more modern alternatives.[/QUOTE]
ext2fsd supports writing to ext2 and ext3, IIRC.
Recently updated my Android ADT version, and realized now the project automatically creates two XML layout files, _activity and _fragment.
Bit confused here:
I started using it, and I keep adding all my layout/buttons/text/views etc.. into _fragment layout.
Is that right? or should I be using _activity instead?
Teaching myself C++ at home. I've only just started a couple days ago.
Is there a "best" way to structure a statement? For example
[code]int main ()
{
std::cout << " Hello World!";
}[/code]
vs
[code]int main () { std::cout << "Hello World!"; }[/code]
Is one preferred over the other? Just curious, wanted to know before I get used to one
[QUOTE=rilez;45258806]Teaching myself C++ at home. I've only just started a couple days ago.
Is there a "best" way to structure a statement? For example
[code]int main ()
{
std::cout << " Hello World!";
}[/code]
vs
[code]int main () { std::cout << "Hello World!"; }[/code]
Is one preferred over the other? Just curious, wanted to know before I get used to one[/QUOTE]
How many one line functions are you planning on writing? People tend to do either
[code]void foo()
{
//Statement(s)
}[/code]
or
[code]void foo() {
//Statement(s)
}[/code]
In reality you wouldn't have a single line main function anyway.
The exception that I personally make (I'm not actually sure if others do this) for single line functions is for getters (and setters if there isn't any value checking).
[code]class foo
{
public:
//Other functions
int getValue() { return value; }
private:
//Other data
int value;
};[/code]
Generally I put getters and setters like this in the header because they are obvious and they keep the .cpp cleaner. Someone correct me if this is bad practice.
Also do a search for C++ conventions. You'll find some nice articles about it, though some will disagree on some things.
[B]NEVERMIND: I'm retarded, For some reason I was thinking it would work relatively.
I'll leave it here anyway.
[/B]
Do you guys see any any obvious path issues here? I can't.
I thought maybe the file was corrupted but it isn't, I've never had issues loading fonts in SFML.NET before.
[IMG]http://puu.sh/9ROzO/9dce8af77c.png[/IMG]
It's probably something obvious. -itwas-
[QUOTE=reevezy67;45260787][B]NEVERMIND: I'm retarded, For some reason I was thinking it would work relatively.
I'll leave it here anyway.
[/B]
Do you guys see any any obvious path issues here? I can't.
I thought maybe the file was corrupted but it isn't, I've never had issues loading fonts in SFML.NET before.
[IMG]http://puu.sh/9ROzO/9dce8af77c.png[/IMG]
It's probably something obvious. -itwas-[/QUOTE]
Use [I]System.IO.Path.DirectorySeparatorChar[/I], [I]/[/I] or [I]Path.Combine([...])[/I] please, using [I]\[/I] makes it difficult to port code.
[editline]1st July 2014[/editline]
I know it's probably some hacky thing you don't intent to release anyway, just pointing it out in general.
I always use /, except in this case because it wasn't working so I copied the directories directly from explorer.
[QUOTE=rilez;45258806]Teaching myself C++ at home. I've only just started a couple days ago.
Is there a "best" way to structure a statement? For example
[code]int main ()
{
std::cout << " Hello World!";
}[/code]
vs
[code]int main () { std::cout << "Hello World!"; }[/code]
Is one preferred over the other? Just curious, wanted to know before I get used to one[/QUOTE]
The most important thing is consistency.
[quote]The most important thing is consistency.[/quote]
^ this
If it's a personal project it doesn't matter, but it's very frustrating when you sometimes do one, then other times the other.
The company i work for forbids the second one in their code guidelines if you want an example.
Fortunately, good editors will allow you to set up automatic formatting for a project and the team can share the configuration.
[QUOTE=Arxae;45263105]^ this
If it's a personal project it doesn't matter, but it's very frustrating when you sometimes do one, then other times the other.
The company i work for forbids the second one in their code guidelines if you want an example.[/QUOTE]
The first one makes more visual sense to me anyway, at least for anything longer than one line. So I guess I'll just stick with that?
I find that it's easier to just look over it and miss it when it's on one line. I do make exceptions for some properties in C# though. But only with fairly simple logic (null check for singleton or so). But since C++ has no properties, not really applicable here :P
ok so i need some serious help because apparently i can't seem to figure out how this works.:suicide: Sorry i'm completely ignorant to this kind of stuff i have a reference from stackoverflow, it's not helping at all. I'm going to be honest i have no idea what any of this reverse iterator stuff is i just wrote down what the example showed on cplusplus.
[code]#include <iostream>
#include <string>
using namespace std;
int main()
{
string Istr;
cout << "Type a sentence to revers, Must have a '.' at the end." << endl;
cin >> Istr;
cin.getline(Istr);
for(reverse_iterator rit = Istr.rbegin(); rit!=Istr.rend(); ++rit)
{
cout << *rit;
}
return 0;
}
[/code]
[QUOTE=confinedUser;45271002]ok so i need some serious help because apparently i can't seem to figure out how this works.:suicide: Sorry i'm completely ignorant to this kind of stuff i have a reference from stackoverflow, it's not helping at all. I'm going to be honest i have no idea what any of this reverse iterator stuff is i just wrote down what the example showed on cplusplus.
[code]#include <iostream>
#include <string>
using namespace std;
int main()
{
string Istr;
cout << "Type a sentence to revers, Must have a '.' at the end." << endl;
cin >> Istr;
cin.getline(Istr);
for(reverse_iterator rit = Istr.rbegin(); rit!=Istr.rend(); ++rit)
{
cout << *rit;
}
return 0;
}
[/code][/QUOTE]
[cpp]#include <iostream>
#include <string>
using namespace std;
int main()
{
string Istr;
cout << "Type a sentence to revers, Must have a '.' at the end." << endl;
getline(cin, Istr);
for(string::reverse_iterator rit = Istr.rbegin(); rit!=Istr.rend(); ++rit)
{
cout << *rit;
}
return 0;
}[/cpp]
This would make it work. Was that your goal or do you need explanation on what's going on in the code?
[QUOTE=Dienes;45271125][cpp]#include <iostream>
#include <string>
using namespace std;
int main()
{
string Istr;
cout << "Type a sentence to revers, Must have a '.' at the end." << endl;
getline(cin, Istr);
for(string::reverse_iterator rit = Istr.rbegin(); rit!=Istr.rend(); ++rit)
{
cout << *rit;
}
return 0;
}[/cpp]
This would make it work. Was that your goal or do you need explanation on what's going on in the code?[/QUOTE]
my goal was to have a user enter a sentence and it reverse and display it backwards. What i don't understand is what any of whats in the for loop(i know what a for loop is but just not the reverse iterators)
[editline]2nd July 2014[/editline]
and i am wondering if i need arrays, if so i have never used them before so this could get very very hard for me. i'm trying to teach c++ to myself as i have nobody that actually knows the language well TO teach me.
[editline]2nd July 2014[/editline]
nvm, it works i guess i didnt need cin, it's like 5 am here so i am like screwed plus i have no cigarettes to take a break so this is a high tension moment :v:
[QUOTE=confinedUser;45271138]my goal was to have a user enter a sentence and it reverse and display it backwards. What i don't understand is what any of whats in the for loop(i know what a for loop is but just not the reverse iterators)
[editline]2nd July 2014[/editline]
and i am wondering if i need arrays, if so i have never used them before so this could get very very hard for me. i'm trying to teach c++ to myself as i have nobody that actually knows the language well TO teach me.
[editline]2nd July 2014[/editline]
nvm, it works i guess i didnt need cin, it's like 5 am here so i am like screwed plus i have no cigarettes to take a break so this is a high tension moment :v:[/QUOTE]
Your string already is an array of characters.
An iterator is like a pointer; it points to a specific item in a container (here: character in the string). You can increase the iterator to make it travel ahead and point to the next item. string::rbegin() returns a reverse_iterator, which is an iterator that starts at the end of the container and travels back to the beginning. So the loop as a whole makes the iterator travels from the last character to the first and for each iteration it prints this character.
Note that you don't need to have a "." at the end, the string instance knows its length.
Sorry, you need to Log In to post a reply to this thread.