..its a site that guides programmers to answers with pointers.
..pun intended? :P
..its a site that guides programmers to answers with pointers.
..pun intended? :P
>Looks like google doesn't let this language run on windows
:-/ Oh, well that sucks. Not a fan of languages that aren't easily portable.
I was just posting to see what the general consensus was to be honest .
Personally, I think that it sounds like a good idea in that Python and C++ are both powerful languages and the combination could balance out each language's disadvantages but I'm not entirely sure how that would work smoothly.. and even though the idea sounds nice I'm not so sure I like it running under Google - 'evil' is a strong word but..
I guess it depends what their plans are for it.. and maybe how open they are about developing it further.
So.. Google are going ahead with their 'Go' programming language - "a cross between C++ and Python".
Not sure what my thoughts are on it yet. What does everyone else make of it..?
Please don't feed the troll.
I still think that all the libraries do is overcomplicate folder navigation. I understand that it might be useful for grouping folders together but then couldn't you just group folders by putting them into their own.. folder (?)
I don't think 7 is anything like OS X to be honest. I seem to recall the task bar being called a rip off of the Mac dock and a flurry of other odd claims but I don't think the libraries obscure file locations, they just feel like a needless add-on for a file system that was perfectly good to begin with.
>My favorite Linux disto these days is #! CrunchBang Linux, an Ubuntu based distribution offering a great blend of speed, style and substance. Using the nimble Openbox window manager, it is highly customisable and provides a modern, full-featured GNU/Linux system without sacrificing performance.
Ditto.
Managed to get Win7 free from my university about 3 weeks ago and I'm dualbooting it with a couple of Linux distros. Most annoying thing about the set up was that Windows eats boot loaders for breakfast.. but after I got that sorted out it was pretty easy. Had a few not-so-healthy crashes but overall it seems to be a really solid and stable OS.
I'd agree with the 'It ain't Linux' point. I'm used to customising whatever I want, however I want but.. you really can't do that with Win7 - it tends to dictate how you run your system. Luckily I kinda like the way it's set up (for the most part anyway - what's with this Libraries bs??) and once you let your guard down it's a genuinely nice system to use. I'd highly recommend it :)
What are you using as an IDE? Always best to get the right architecture..
You can try googling a Tausworthe generator - that's the most common random generation function that uses a shift register and I think that's what you'd want to use.
I couldn't find any concrete C++ examples but good luck anyway :|
..so do you need to generate a random 10 digit binary sequence using the bitshift operators? (<< and >>)
>Eh, these days most of us practically live in our web browsers. Richard doesn't need anything from the www? Hmm...
Yea, I found that kinda weird too..
>.. And then consider that Musicians don't tend to be geeks, and ask yourself why so many of them use Macs? It's because they work. And because musicians can't afford to loose their work to a virus.
What rubbish. If anyone buys easily into trends, it's musicians.. and anyway, you can't talk about the entire freakin' music industry as if it's dominated by Macs. It's not.
Iron is awesome! Thanks for the suggestion :)
I recently dual booted my machine with Windows 7 and the switch from Linux inspired me to try out the Google Chrome browser.
I actually really like it: it's minimal with a good, clear interface and seemingly even faster than Firefox.. but I've heard from a couple of sources that virtually every site/search term/download etc is logged by Google, bringing about a rather disturbing 1984 atmosphere to the whole thing :|
Can anyone confirm/dispell that rumour? And what are people's thoughts on Chrome anyway..?
..php and other web languages would be cool to look at for getting a good grasp on networking. I'd love to have a proper go at some assembly as well just for the sheer geek factor :)
I don't think you want to assign temp to your tail_ptr because temp->nxt = NULL so all you'd be doing is assigning space for a new node into tail_ptr and then making it the end of the list.. Maybe if you made temp->nxt point to the start_ptr.. (?) See if that works.
I'm pretty sure that none of your nodes should have a NULL pointer in them because the links should all join up..
As far as I know, 'traverse' simply means to move through the list/tree.. so to traverse a 'card' back to the 'home card' would just mean to move the appropriate node to the start of the list. Your move_current_back() function should be able to deal with that.
I've also noticed a lack of good resources on circular linked lists so I'm also officially interested in any links/examples anyone can conjure up although I'm not sure why you'd need a circular linked list for a simple deck of cards.. Unless it's been specified that you need to implement a circular linked list then I can't see any reason why a normal linked list wouldn't do the trick (?).
P.S. The code you posted (taken straight from a tutorial) could do with a couple of improvements.. getting rid of those global variables by having your functions accept a start_ptr would be a little cleaner :)
..just a note that system("pause") is not a good idea.
..aren't single inverted commas just for char variables? Maybe that would cause a problem because the compiler would be expecting one character and receives two. Just a guess :-/
Also, your 'int main' function needs to return a value. The most basic example program will show you how to do this. You don't need to use a string variable for height but if you wanted to you would have to declare it after 'using namespace std;'
That and VernonDozier's post should clear up the compiler errors but I'd recommend reading over the basics of the language again, especially if this is for some kind of homework assignment..
This site should be useful: http://cplusplus.com/doc/tutorial/program_structure/
OK, guess I'll start using them regularly then. Thanks for all the replies.
Thanks for the responses.
So then the main advantage is portability..
Does that mean that size_t variables will literally be different sizes on 32-bit and 64-bit systems? And is it common practise to use them for array indices?
Hi,
I noticed a few snippets recently where a size_t variable was used for array indices, and after searching around I'm still not sure what the obvious advantage of using a size_t variable over a typical int would be..
To clarify, what would be the difference between this:
for(size_t i=0;i<5;i++)
//do something with arr[i]
..and this:
for(int i=0;i<5;i++)
//do something else with arr[i]
Is it worth using size_t variables in fairly generic, simple console apps etc or do it's advantages (if any) only become apparent at a much higher level of complexity..?
Not urgent, was just interested :)
As ShawnCplus has mentioned, the calls to the functions are incorrect.
You aren't returning your average value from the calcAverage function into a variable so you won't be able to pass it into your printing function.
When you call the calcAverage function it should return into a variable:
int avg = calcAverage(int score1, int score2, int score3);
//return value from this function is copied into the avg variable..
This will allow you to pass the avg variable into your print function. You might think about drafting up a simplified version and reading up on returning variables from functions.
Hope that helps..
See if this is helpful:
Passing Multi-Dimensional Arrays to Functions
Salem's post seems like it would be (as usual) very beneficial to you.
This link is also provided in the thread and might help clear up your understanding of pointers:
http://www.cplusplus.com/doc/tutorial/pointers/
In future, appease the gods :)
Remember that a generic psu will supply nowhere near what a name brand psu will, nor is it as reliable.
Thanks for the tip, I'll bare that in mind.
Great, it's coming out at under 200w even with potential extras factored in. Thanks a lot for your help!
The gfx are onboard and I'm pretty sure it comes with one 92mm fan. Thanks for the link, I'll plug everything in now.
BAREBONES: Shuttle XPC Barebone SG31G2
RAM: Corsair XMS2 4GB (2x2GB) DDR2 PC2-8500C5 TwinX Dual Channel
CPU: Intel Core 2 Duo E8500 LGA775 'Wolfdale' 3.16GHz
HDD: Seagate Barracuda 7200.12 500GB SATA-II 16MB Cache
PSU: 250 Watt mini power supply unit
+ standard cd drive
Hi there, I've just purchased a barebones Shuttle PC (+components) and will be building it soon. However, I read a review that suggested the power supply provided (250w) was quite low. I was under the assumption that small form factor PCs can run with less power consumption than a standard ATX system but after reading that a typical ATX system power supply is about 400w I'm a little worried that my psu won't be capable enough.
I won't be running anything particularly extreme on the Shuttle but I often use quite cpu-intensive programs like Cubase and Max/MSP. Can anyone tell me whether this (250w) is a typical psu for a small form factor? And, if not, what kind of wattage should I be aiming for instead?
I can post system specs if it's helpful to anyone :)
Are you running additional hardware? If not, you shouldn't need any drivers.. If you are then have a look through the link Salem posted.
If you still can't find what you're looking for then maybe try looking through ubuntuforums.org
I was curious about Linux and switched from Windows to the latest version of Ubuntu about 3 or 4 months ago..
Personally, I think it's a very easy distro to use and there's a huge amount of online support for it. I've never had any real problems installing drivers/libraries/software and using deb packages makes installations even easier. If compatibility is what you're looking for, then I'd definitely recommend it. Linux is very suited to programming as well - I've found coding quite a bit smoother after I switched..
Good luck!
www.ubuntu.com/
It seems that most people other than Tom Gunn need to swing by here and have a nice long read.
..that is potentially the most useful page about a C topic I have ever encountered.