31 Discussion / Question Topics
Remove Filter I recently started using Code::Blocks and have written a small program to read in from a file. I think the problem i am having is the file not being found. Where does the IDE search for the file and how would i change this? Can i just input the whole … | |
I am becoming annoyed at the amount of responses on this site saying (something along the lines of) "This thread is 5 years old, please leave it alone.". Then there is often the response (again, something along the lines of) "Please search the site before asking a question that has … ![]() | |
I disagree with the idea of upgrading or degrading a poster anonymously without a reason. If you want to "score" someone on their post, surely you should have to give a reason why you did so. Do you think anonymous grading is the way to go? | |
Sorry if i'm in the wrong forum but here goes: Does anyone know how to restore a Toshiba Satellite laptop back to the factory settings? The laptop did not come with any back-up discs. | |
[URL="http://www.youtube.com/watch?v=lyZQPjUT5B4"]The coolest bubble-sort ever.[/URL] | |
English rioting for no apparent political reason, more a case of get what you can while the going is good. Does it get much worse than [URL="http://www.bbc.co.uk/news/magazine-14487982"]this[/URL]? Is society really broken? | |
At what point does conciseness become more important than readability, or vice-versa (given that there is no difference in performance)? Is there an element of snobbery amongst programmers to certain techniques or are certain things just purely bad practice? | |
I wrote this test code trying to work out a problem. The code gives the correct answer for the example (zero) but to understand the problem i need to understand what the code is doing on a sort of step by step basis. In other words how to do it … | |
I have got to get one of [URL="http://www.bbc.co.uk/news/technology-12997245"]these[/URL].:icon_cool: | |
Is there a way of telling from a post (including my own) if someone just isn't cut out for programming? For example a really simple piece of logic not being understood (as opposed to a lack of knowledge of the language). | |
1. When posting a link, how do i make my link look like [COLOR="Red"]here[/COLOR] instead of [url]http://blablabla?[/url] 2. When quoting someone else, how do i let people know who i'm quoting? 3. How do i create a link like this?[URL="http://www.daniweb.com/community-center/geeks-lounge/threads/341464"]http://www.daniweb.com/community-center/geeks-lounge/threads/341464[/URL] | |
It may not turn out as you [URL="http://www.dailyrecord.co.uk/news/weird-news/2011/03/22/blundering-surgeons-cut-off-man-s-testicles-86908-23007198/"]expected[/URL]. ![]() | |
As a beginner i am very thankful for the advice given by people who clearly know far more about the subject than myself. I have answered some threads that i feel i understand (sometimes), but i regularly see "experts" answering the most basic of questions (including mine). Are you people … | |
I managed ~120 in c++(no big-nums in c++, made it a bit harder) with no external libraries and a "very" limited knowledge of programming. Have hit the wall now (mostly the math i think). Has anyone else given this a go and how did they do? This is not supposed … | |
[CODE]bool is_prime(int a) { if(a==1){return false;} if(a<4){return true;} if(a%2==0){return false;} if(a<9){return true;} if(a%3==0){return false;} int i; for(i=5;(i*i)<=a;i+=6) { if(a%i==0){return false;} if(a%(i+2)==0){return false;} } return true; } [/CODE] critique welcome. | |
Hey there. I'm trying to figure out how to subtract one array of integers from another. I have figured out how to add 2 together going digit by digit and carrying over. I have no idea how to go about subtracting one from another. Basically i want to do simple … | |
Can anyone tell me how to find the maximum value for a specific variable(i.e int, long long int, double)? Also is there a way to set a variable to this value(without knowing it and typing it in)? Using Dev C++. Any help appreciated.:) | |
Can anyone tell me if it is possible to set a value in an array to infinity and if so how to go about it? Thanks. | |
Hey, i know this is a commonly asked question (and will probably get burned for asking it again) but wanted an up to date answer so here we go. I'm trying to learn to program in c++ purely as a hobby. I have recently spent some time doing problems at … | |
hi again, i'm just full of problems. i have a vectors of ints and i am trying to find a way to check if there is a repeatting sequence within the vector and what size this sequence is. Does anyone have any suggestions on how i should go about this? … | |
in my code i have declared [CODE]typedef signed long long int slong; const slong limit=4000000; const slong limitsqr=2000;[/CODE] i then created an array [CODE]slong* array=new slong[limit];[/CODE] without any problem. when i try this [CODE]slong* newarray=new slong[limitsqr][limitsqr];[/CODE] i get the error message: in function int main() cannot convert slong(*)[2000] to slong … | |
Hi, new to this so go easy. I'm trying to store a function i wrote in a file and call it with a header file rather than copy and paste as ive been doing but i keep getting error messages from the compiler. Can anyone point out what i'm doing … | |
How do i create a large array in c++? Apologies if this has been answered already but after searching didn't find what i was looking for. i want to create an integer array of size 1500000 i.e int array[1500000] but my compiler wont allow it. I remember seeing something about … | |
Sorry if this is repetative but still struggling with this. i wish to multiply 2 long integers together. if the result is outside of int64 range i want the loop to break otherwise i want to keep the result and increment the second number. have tested this, but when the … | |
when i try to use pow with cmath header i get error message pow(int,int)is ambiguous it also gives other possible options i.e pow(double,int) why is int^int ambiguous? how could it be less ambiguous? | |
hi, beginner question i am planning to write code for different values of a^b. both a and b will vary in the program and both will be long long ints; as my compiler wont allow pow(int,int) as it is ambiguous(dont know why) either while have a as a double and … | |
trying to write a fuction to work out the GCD of two numbers seems to run ok but the return is incorrect any help much appreciated #include <iostream> #include <cmath> using namespace std; int g_c_d(int a,int b); int main() { cout<<g_c_d(2871,4060);/*test example*/ cout<<endl; system("pause");/*been advised not to use this but … | |
Hey there, this code was supposed to work out th GCD of 2 numbers added cout line in function and code seems to be running fine but it returns 4249024 instead of 29 this is probably a basic error on my part but can anyone tell me why? thanks for … | |
Hi, total beginner here, trying to learn at home. Just thought i'd get that in. if i have a number eg 123 trying to figure out a way of calculating all the possible cominations 123 132 213 231 312 321 can do it with pencil and paper but don't know … | |
Hey there. Just beginning to learn c++ on my own(not easy). Please fogive my lack of knowledge. I have a list of large numbers(50 digits) that i copied. I want to split them into an integer array of size [100][50]. I dont want to have to go through and put … | |
Hey there folks. New at this so forgive any mistakes, first post. I'm beginning to learn c++. Not so easy. After reading a few threads went to project euler. Problem i have is problem 3. " The prime factors of 13195 are 5,7,13 and 29. What is the largest prime … |
The End.