No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
Howdy! I've searched the forums and Google for ideas but all the information/advice I found was either not helpful or inaccurate. So, perhaps someone here can help point me in the right direction. I'm heading off to University next year but, before I do that, I'd like to study some … |
|
Re:
Hi... I'm trying to study graphs but I cant find a good tutorial on it. I googled it, but couldn't find what I needed. Can you please suggest me a good tutorial on graphs in c++. I am basically looking for how a graph class is implemented in c++, an … |
|
heya.. i wanted to ask if there was a way to give a pointer to a multidimensional array of, say, ints, as a function argument. i tried a somewhat natural approach, which seems to have failed.. i'm no expert at stuff like that, so i tried: [CODE] int numbers[ 10 … |
|
Hmm, i kinda aint in the mood to dig the net about this, so i guessed i'd post my question here.. I'm not so familiar with the time library...is there a nice easy way to drop some code into the loops to check which one is slowing down the program? … |
|
Re:
Hi guys I'm a fairly lightweight (in virtual world only, sigh) hobbyist who finds programming fascinating. I enjoyed teaching myself C++on my old machines. Bloodshed Dev C++ I found particularly robust and reasonably forgiving in older Windows OS. We recently switched to Linux for most of our machines and I … |
|
okay, this one's supposed to take n numbers, ints/floats, sort them, spit them out... now i have my code, and it looks fine to me, i'm doing bubblesort while checking with a bool function is the first larger than the second string... if i use two numbers, it works fine … |
|
is there a way to "resize" a lib. string? is there a way to limit/set its size to a value? umm, and yeh, is there a better algorithm to search for all substrings in a string than this one i've made: [CODE] for( int i = 0; i < s.length(); … |
|
i'm having problems reading with scanf... i'm trying to input some coordinates enclosed in brackets but it kinda skips the input that way... is it forbidden to say scanf( "(%d,%d) (%d,%d) (%d,%d) (%d,%d)", x1, yo, x2, y2, x3, y3, x4, y4 );? i'm using yo instead of y1 cause cmath … |
|
Is there a nice function or a way of inputing values into an array until newline? i kinda don't like doing it with gets(); and then check if index%2 is 0 and then if it is i store the int(); value of the char - 48 into a new array. … |
|
Re:
Hi! Programing a program with the fibonacci numbers, but having some problems getting the program to work as it should. The problem is that the user which is using the program are going to type a "max value" of how far he wants to count the fibonacci numbers. So if … |
|
okay, i know i might be boring with my questions but could someone tell me how can i read an array of floats mixed with ints and then print them out same as they were on input...? typecasting thing again? anyone knows a good book i could use to stop … |
|
Okay, so i have an idea...that looks like it should work. I'm supposed to be able to multiply for example: 1234567812345678912345678*1234562345673456. My idea was to put each number into a string, and then make a matrix to store the values of each digit multiplied by each digit... i'll put an … |
|
could someone please check this code and tell me where i went wrong... it always gives the result 1.00000 but as you can see in the for loop it shouldn't be like that. [CODE]#include <cstdio> int main(void) { int n; float s = 0; scanf("%d", &n); for(int i = 1; … |
|
i'm trying to get the last word of the sentence using strtok.. i tried this :[CODE]while (tok != NULL) { tok = strtok (NULL, " "); if((tok != NULL) && (strtok(NULL, " ")==NULL)) printf("%s", tok); }[/CODE] kinda doesn't work... anyone knows why? Yes, tok is a char * pointer.. |
|
okays... so i'm looking for some kind of a standard algorithm that doesn't take long. i thought going backwards, finding the first space, writing the last word and nulling (is that even possible?) each char, but that doesn't really sound good to me. I've seen some people say you should … |