-
Began Watching Function Callbacks problem?
Hello everyone.. I am a little bit stuck on this small problem. I'm trying to understand callbacks but seem to be no understanding something. It is probably something very simple. … -
Replied To a Post in Function Callbacks problem?
A quick *Google* turned up this ... (for starters) http://www.cprogramming.com/tutorial/function-pointers.html > ... > Callback Functions > Another use for function pointers is setting up "listener" or "callback" functions that are … -
Began Watching D-o-B
take an input date of birth from the user and display star of entered date of birth Plz help me in ths programm -
Replied To a Post in D-o-B
Perhaps the OP means ... 'under what star' was that DOB ? If so ... then the programmer needs a program that has a table of 'Stars' and dates (or … -
Began Watching Need help with C-strings/Library program
Hi, I need some help with starting a program. Kind of lost on how to begin it, any guide to start it would be helpful. Here is the link of … -
Replied To a Post in Need help with C-strings/Library program
> This (C++) lab will help you practice with C-strings and libraries. Function overloading (in C++) might come in handy, as well. > Two useful functions that are not provided … -
Replied To a Post in Having hard time newbie
Also ... you will have much more joy in your coding in C when you find some regular ways to easily handle the problem of char's left in the input … -
Began Watching Having hard time newbie
I'm totally new to programming and taking an intro class. When i prompt the user for a state code the program just exits, nothing in my book really goes over … -
Replied To a Post in Having hard time newbie
Further to the above by *Ancient Dragon* ... you may like to recall that C strings are pointers to ... (a '\0' terminated block of) char ... (i.e. addresses) So … -
Replied To a Post in column major not shown right
This example may be helpful ... /* matrixMult.c */ /* each matrix here is stored as one long vector with row*col length */ #include <stdio.h> #include <stdlib.h> /* re. malloc … -
Began Watching column major not shown right
(Continued from [here](http://www.daniweb.com/software-development/cpp/threads/474128/column-major-not-shown-right#post2070227) ) I am trying to use column major order to a 2d matrix which I am using as 1d. int N=3,R=2; for (int i=0;i<N;i++){ for (int j=0;j<R;j++){ … -
Replied To a Post in column major not shown right
oops ... see below -
Began Watching Parsing Date - Can someone tell me what is going on with this code?
OK, I've acheived HULK SMASH levels of frsutration with this one. I simply want to parse a date in the form of ##/##/#### The code below works peicemeal, ie each … -
Replied To a Post in Parsing Date - Can someone tell me what is going on with this code?
This parsing could be a breeze if you use C++ string and stringstream to parse ... using : istringstream iss( cppStrToParse ); // construct iss getline( iss, cppStrMth, '/' ); … -
Replied To a Post in C++ Palindrome with single stack & method
You may get some ideas from the example below ... (that uses C++ STL stack and ...) Recall that a stack is FILO <-> First In Last Out. // testPalindromeAllInOne.cpp … -
Began Watching column major not shown right
I am trying to use column major order to a 2d matrix which I am using as 1d. int N=3,R=2; for (int i=0;i<N;i++){ for (int j=0;j<R;j++){ //printf("\nX[%d]=%d\t",i+j*N,res[i+j*N]); //column major // … -
Replied To a Post in column major not shown right
Since you are coding ALL in C, why not start fresh in the C forum ... I think I have some ideas that you may find useful. -
Replied To a Post in calculating sum of series of cubed numbers
Congratulations ... you got it working. But ... I hope you have the right solution, because that is not how I understood your coding problem ... (see above.) > Ask … -
Replied To a Post in calculating sum of series of cubed numbers
If what you want do, is to sum a series of numbers cubed, you can very simply just, for each next real number x, add x*x*x to the sum. Note: … -
Replied To a Post in String comparison (string manipulation) and sorting, need help
If this is another problem ... (i.e. a new assignment you are working on), please start a new thread, and state clearly what the problem is, what your quide lines … -
Replied To a Post in Trouble with function.
That help was so thoughtful, when half sleeping, it must be awesome when awake :) -
Began Watching Trouble with function.
Hey guy. I'm a new beginner in C++. I'm have some problem with my new code I have just written. I try to draw a triangles with from the characters … -
Replied To a Post in Trouble with function.
I think "Schol-R-LEA" meant to type: using namespace std; // :) It it always good, (especially for beginner coders), to start out with a working shell C++ program like 'Hello … -
Replied To a Post in String comparison (string manipulation) and sorting, need help
I do not have access to your string type ... (nor do I care to have access to it.) I sent you a link to a string class ... so … -
Replied To a Post in Vectors/Classes Program, Need Help
re. if you want to add a sort function to sort by 1. names or 2. points to sort a C++ list, just call the STL sort provided list < … -
Replied To a Post in Vectors/Classes Program, Need Help
* re. class City_list version ... See how easy it is to get to that ... (working from the example already given) ... // distanceTwoCitiesList.cpp // #include <iostream> //#include <fstream> … -
Replied To a Post in Vectors/Classes Program, Need Help
1. re. int takeInChar( const string& msg ) { cout << msg << flush; string reply; getline( cin, reply ); if( reply.size() ) return reply[0]; // else ... if did … -
Replied To a Post in Hay i need help
You forgot to ... > Show us where you are having trouble(s) ... -
Replied To a Post in calculating sum of series of cubed numbers
... only a few ? Coding can really be fun ... once one knows what to do :) It may take quit a while ... for that to happen ! … -
Began Watching Cents into Dollars using a Function prototype
My program is almost done, but when i try to convert a number into cents, it does not calculate the cents properly. So if i enter 325, it says i … -
Replied To a Post in Cents into Dollars using a Function prototype
So ... are you saying that you need to keep asking for more cents to be input in a loop ... until the user indicates that they are done ? … -
Replied To a Post in multiply 2d arrays as 1d
That is not a map of M -> v ... v is all set to zero there, ( but it shows the general idea, if zero is replaced by M[i][j] … -
Replied To a Post in multiply 2d arrays as 1d
Can you show your map of a 'n by m' Matrix to a vector of length n*m ? And then do regular matrix multipliction ( with appropriate size checks) ... … -
Replied To a Post in Vectors/Classes Program, Need Help
Just pull the respect code parts out ... and put them into a ... .h file (with appropriate 'guards') and a ... .cpp file that includes the .h file Then … -
Began Watching multiply 2d arrays as 1d
If I want to multiple 2d arrays as 1d how should I do it? I mean ,I have a 2d array and I map it as 1d: for(int i=0;i<rows*cols;i++) A[i]=... … -
Replied To a Post in multiply 2d arrays as 1d
Is what you are trying to do is to transform a vector? i.e. M1*v1 => v2 i.e. Matrix1 times vector1 = vector2 ? -
Began Watching C++ Palindrome with single stack & method
I am trying to create a palindrome checker using a single stack and pass by reference method. I just have to write the evalPalindrome() method and then I input it … -
Replied To a Post in C++ Palindrome with single stack & method
Just noticed this post, that seems to go with your other post ... Again, it would seem best to use the C++ STL stack (or list) to hold the char's … -
Began Watching stuck trying to remove spaces and punctuation
I need to remove the spaces and punctuation from the original string and the reverse string, then put the letters only into temp strings for comparision. When I run the … -
Replied To a Post in stuck trying to remove spaces and punctuation
Why are you using ... "ArrayStack.h" It would seem much better to use the C++ STL stack (or list) to hold each char ... then we can 'talk' ... Also … -
Began Watching Hay i need help
How i can make a Matrix by using 2 dimension arrays and function ? please i need answer thanks. -
Replied To a Post in Hay i need help
Can you show us what code you have tried? Start with a working C++ shell ... and add from there, in steps. Show us where you are having trouble(s) ... -
Replied To a Post in String comparison (string manipulation) and sorting, need help
Check here ... http://www.4shared.com/folder/xPqGQHPl/class_String.html Also see 2 demos there ... -
Replied To a Post in String comparison (string manipulation) and sorting, need help
It seeems you don't have C++ string Try using the class String I linked to, on your other post. -
Replied To a Post in Convertion
Try this class String http://www.4shared.com/folder/xPqGQHPl/class_String.html and the test file there -
Replied To a Post in Convertion
Well ... that was insightful :) Maybe ... you could switch to the C forum ... and do the code all in C? But first? Do you have C++ strings … -
Replied To a Post in Convertion
A working code 'shell' is just a starting sequence of code that compiles and gives the exact expected output for all accepted input ... You are still coding in C … -
Replied To a Post in Convertion
Please show your working C++ code shell ... that takes in a valid C++ string and ... Below is some working C++ demo code that inputs a C++ string and … -
Began Watching Convertion
Hi really need help. I'm new to programming and my teacher just gave a problem program "Conversion from any base to base 10" . So search in google and find … -
Replied To a Post in Convertion
> Conversion from any base to base 10 Is that what your example tries to do? No! You may glean some ideas there ... though? If you are to code …
The End.