3,892 Posted Topics
Re: Hmm looks like your basics are a bit err.. shaky. You got most of the syntax there wrong. Why not revist the basics by learning something about C++ with good books. Some tuts [URL="http://www.google.co.in/search?hl=en&q=C%2B%2B+tutorials&btnG=Google+Search&meta="]here[/URL] I think maybe u looking for something like this: [code] #include <iostream> using namespace std ; … | |
Re: [quote=ToySoldier;257640]. [code] class PAIR {private: int a; int b; public: void print(); PAIR(); PAIR(int); PAIR(int,int); ~PAIR(); void swap(); int diff(); int big(); int area(); }; int main() { PAIR c, d(2), e(12,13); int ans; c.print(); d.print(); e.print(); d.swap(); d.print(); e.swap(); e.print(); ans = c.diff(); cout << "\nThe answer to c.diff() … | |
Re: Hmmm... blogging eh. And you reached a 100 congrats man. Maybe even I should start a blog but dont want to take away your happiness since i cana exceed that number in a few days. (damn it now just how do you start making a blog in Daniweb, wheres' the … | |
Re: Yes we would very much like to help you in every aspect of your coding but first we need to see how much you have attempted. As you are doign this course you must be havign some knowledge of programming, so just show us where you are stuck doing that … | |
Hey i was just wondering which is the prominent langauge in the United States of America which is used for development. I know it sounds a bit amatuerish but i dont know how to frame this question. Just wanted to know which langauge is worth learning so that the one … ![]() | |
Re: Show some efffort on your part friend, didnt you find your answer here: [URL]http://www.daniweb.com/techtalkforums/thread55862.html[/URL] | |
Re: Maybe you can get some help here: [URL]http://msdn.microsoft.com/windowsmobile/reference/gettingstarted/default.aspx[/URL] [URL]http://newlc.com/Getting-started-with-Symbian,134.html[/URL] Hope it helped, bye. | |
Re: Why not learn to use them from here: [URL]http://www.codersource.net/cpp_file_io.html[/URL] [URL]http://www.gamedev.net/reference/articles/article1127.asp[/URL] [URL]http://www.cplusplus.com/doc/tutorial/files.html[/URL] Best of luck. | |
Re: #include <iostream> #include<iomanip> #include <cmath> usingnamespace std; int main() { char choice; int total_numbers = 0; const int arraysize = 20; int num[arraysize]; do { cout << "I will give you the Sum,Mean,Var & the Std Dev of any series of numbers?Y/N:" << endl; cin >> choice; if (choice == … | |
Re: If you want a third party library for interfacing between C++ and TCL then maybe you should look here [URL]http://cpptcl.sourceforge.net/[/URL] As for your second part of the question you havent as such mentionend what exactly is ICE otherwise i would have definately said something. Hope it helped, bye. | |
Re: Dont know what exactly you want but if you want some tuts on interfacign MySQL and C you can visit some of the links given below: [URL]http://www.tol.it/doc/MySQL/[/URL] [URL]http://dev.mysql.com/doc/refman/5.0/en/c.html[/URL] Hope it helped, bye | |
Re: I completely agree with Mr. Comatose without graphic artists and animators there is no point in moving ahead since there is nothing you can test your code on. Map developers and Graphic artists are the key to game dev. Round up some of your friends who are interested in graphics … | |
Re: [quote=ToySoldier;256897]Hi, [code] #include <iostream> using namespace std; class PAIR { private: int a; int b; public: void print(); PAIR(); PAIR(int); PAIR(int,int); ~PAIR(); void swap(); int diff(); int big(); int area(); }; int main() { PAIR c, d(2), e(12,13); int ans; c.print(); d.print(); e.print(); e.swap(); e.print(); ans = c.diff(); cout << … | |
Re: Please explain the problem clearly so that we can help you out. Post your entire code along with the problems you are encountering.. whether it is compile time error or run time error or the program is not working as expectd and so on. Maybe then we would be able … ![]() | |
Re: [quote=n3st3d_l00p;256092][code] cin.ignore(); cout << "Enter lecture notes/tutorials location.\n"; cout << "e.g C:/Lecture Notes/lecture01.ppt"; cout << ">>>"; getline(cin,lectut_loca); cout << "Enter lecture notes/tutorials name: "; cout << "e.g lecture01.ppt"; cout << ">>>"; getline(cin,lectut_name); string copy = "copy"; [COLOR=Red] copier[/COLOR] = copy + " " + lectut_loca + " " + lectut_name; … | |
Re: Why not just try to complete the assignment in Turbo C. In the help section of turbo C there is a small tutorial which explains how to setup graphics in Turbo C along with a small example. And just copy pasting the files wont do the job coz Turbo C … | |
Re: [quote=Iqbal_h_a;255313]When I compiled the follwing code snippet, it compiled without any error. My question is if it is allowed to declare [I]char[/I] fields inside a structure, then how can I store character string in that variable(we can not use functoins like strcpy:-| ). OR Is it not allowed to declare … | |
Re: What kind of optimization do you want to perform on this code, performance wise or lengthwise ? Please be more specific. | |
Re: [quote=compshooter;256439]I get the following error on the first line of my array... " syntax error before `}' token " My eyes are about to fall out of my skull. Can someone take a look for me, everything seems to be fine, but maybe I'm blind. Here is the code in … | |
Re: Maybe you can try out something of this sort and make it more robust and suiting to your own purpose. [code] using namespace std; int main() { int number=10; int your_number; char answer = 'y'; do { cout<< "\nguess the number: "; cin >> your_number; if(number == your_number) { cout<<"\nCongrats!"; … | |
Re: Welcome to the forums and btw it is a rule here that you should first post your attempt or your code to get help from someone else. Just demanding the code will not fetch a lot of help. Still since this is your first post i will let it pass. … | |
Re: [quote=darkeinjel04;256062]Can anyone help me w/ this....help me make a program of pascal triangle[/quote] A well detailed example here; [URL]http://www.daniweb.com/techtalkforums/thread49775.html[/URL] | |
Re: [code]#include <stdio.h> #include <string.h> char* string(char *str); int main() { printf("%s\n ",string(" in this method ")); getchar(); return 0; } [COLOR=Red] char[/COLOR] string(char *str4) [COLOR=Red]// the char should be char*[/COLOR] { char str[25] = "How"; char str2[25] = " do I "; char str3[25] = " return a string"; strcat(str,str2); … | |
Re: Hmm as such its very vague coz u see both the binary and the application along with shared object resides at your own PC and even you uploaded it here no one would have the time to go through it. Be a bit more specific and try localising the problem … | |
Re: If you want someone to help you, it would be really better if you err... made your problem description a bit brief giving us what you have so far gathered about the problem and what have u decided till now. Try to make a skeleton or the framework for your … | |
Re: Why not try out Java, since it is really good at such things and with the inbuilt excellent GUI support it would be an added advantage ? Even Python along with one of its graphic toolkits can be used for the purpose. Also it depends on the kind of experience … | |
Re: [quote=bkas3;255133]What if you were told to use arrays to solve this?[/quote] Dont resurrect dead threads. Take a look at the date and time of the thread before posting. Mr. MOD please close this thread or delete the above two posts. | |
Re: Though i dont know what exactly blackjack is but i think this is wat u want. [code] #include <iostream> using namespace::std; int main() { char cards[13]={'2','3','4','5','6','7','8','9','0','J','Q','K','A'}; char deck [260] ; for (int i=0; i< 260; i++) deck[i] = cards [i % 13]; for (int i = 0; i < 260; … ![]() | |
Re: [quote=Laiq Ahmed;254905]please help me understand the folowing code.... [code] class A { int a; public: A() : a ( 0 ) {} int get() { cout << "Hello WOrld " << endl; return 0; } }; int main( int argc, char** argv ) { cout<< ((A*)3)->get() << endl; return 0; … | |
Re: Segmentation error means runtime error which you get when you access the memory location which doesnt belong to you. A typical case where this kind of error occurs is during array accessing which is known as buffer overflow. Are there any array accesses in your code and if yes then … | |
Re: Used to watch his documetaries as a kid, he looked really cool teaming up with his wife and performing all those things. But like they say, "when you have got to go, you have got to go". May his brave soul rest in peace. R.I.P. Irvin | |
Re: Maybe the below links will help you to increase your knowledge about these things and complete your project: [URL]http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=/com.ibm.xlcpp8l.doc/language/ref/strct.htm[/URL] [URL]http://www.velocityreviews.com/forums/t317932-bit-fields-in-a-structure.html[/URL] [URL]http://publications.gbdirect.co.uk/c_book/chapter6/bitfields.html[/URL] [URL]http://www.cs.cf.ac.uk/Dave/C/node13.html[/URL] Hope it helped, bye. | |
Re: I think maybe you are looking for function pointers which can decide which function to execute dynamically depending on the type of input by the user or triggered by some condition in the program. So if you have ten functions in a file "functions.c" with the same signatures and return … | |
Re: [quote=cscgal]I refuse to post a listing of all of the possible user titles, because it is incentive to keep on posting to see what your next user title will be![/quote] Err... dont you think that those who use 5% of their brain would be able to find out the titles … | |
Re: Maybe this link will help you in formulating the problem statement [URL]http://en.wikipedia.org/wiki/Cluedo[/URL] First decide on the kind of depth you want to achieve in your game, how your game is goign to interact with the user, the input received by the game and the output. Then make a rough sketch … | |
Re: Maybe something likie this is what you are looking for: [code] #include <iostream> using namespace std ; bool checker (int number, int& total) { if (number == 0) { return false; } else { if (number%2 == 1) cout << number << " is odd" << endl; else cout << … | |
Re: If you are working with C++ and your application really demands high precision and range why not try out some third party libraries like these: [URL]http://www.nongnu.org/hpalib/[/URL] [URL="http://www.tc.umn.edu/%7Eringx004/mapm-main.html"]http://www.tc.umn.edu/~ringx004/mapm-main.html[/URL] [URL="http://cliodhna.cop.uop.edu/%7Ehetrick/c-sources.html"]http://cliodhna.cop.uop.edu/~hetrick/c-sources.html[/URL] Though these libraries require you to study them before you use them, they are worth the effort. HOpe it helped, bye. | |
Re: Maybe something like this is what you are looking for [code] int main (void) { int i, j ; char num_string[] = "1 234 23 45" ; char tmp [2] = {'\0', '\0'} ; int length = strlen (num_string) ; int* values = (int*) malloc (sizeof (int) * length) ; … | |
Re: Maybe you would want to have a look here for some OS related resources. It features the implementation of a bankers algo and some of the other advanced topics overview which should help you in deciding which project to choose. [URL]http://www.bernstein-plus-sons.com/.dowling/CSC080/[/URL] Hope it helped, bye. | |
Re: [quote=VinceColeman;253464]I have to use a variable of type double to store and manipulate a value for an amount of years. This means I have to ensure that the data input by the user is an integer. The program will accept a non-integer value, but I want it to continue reprompting … | |
Re: Its normally a rule of the thumb to close the file pointer as soon as you are finished with it to avoid the undefined behaviour of the file stream which you have opened. Even if you dont close the file stream, they are automatically closed when your program exits but … | |
Re: A C++ compiler, an IDE and a GUI toolkit like the GTK+ which can be used for creating the user interfaces. This should be the bare minimum to get you started with. BTW dont expect a source code or any help of that kind from here since we can only … | |
Re: Please seperate your code into logical functions and modules then point out to us which section or logical part is not working as you expected. Giving out such a huge code as Mr. Andor said will not attract much attention. Try localising the problem and then repost. Localised errors in … | |
Re: Yes what Mr. WaltP has said pretty much clarifies the situation. If you still need to know some functions which will help you in achieving your task then: 1. Read the current line in a string "currentLine". 2. Let the contents be eg. <p>Here is my content</p>. 3. Find the … | |
Re: [quote=Anonymusius;253177]Try using an global variable instead of passing one [/quote] Yes i completely agree with Mr. Grunt, passing global variables is not the best programming practice around. And to suggest this to someone who has just started programming is not a good thing since they dont know the side effects … | |
Re: Maybe something like this which will implement a basic AND logic will help you understand the thing better: [code] int main () { bool first [] = {true, false} ; bool second [] = {true, false} ; for (int i = 0; i < 2; ++i) { for (int j … | |
Re: [quote=poorni;253220]i have the program which i wrote by myself... i juz wanted know whether anybody have good idea abt it...[/quote] If possible please post your code so that we can have a good loook at it and then try to help you in any way possible. | |
Re: I wish to help you, but I am a bignner at C++ and the main reason that you are using a long code and I am really tired and i am feeling weariness, perhaps I will read it later and theN i will see if I can help you or … | |
Re: Maybe you are a bit confused between Programming and Scripting languages, though the demarkation is a bit fuzzy but Scripting langs are meant to be simplify the task of the programmer and carry out repetitive tasks in an automated and easy manner. They have inbuilt automatic garbage collector. They are … | |
Re: The best data structure to keep track of millions of record (i mean there is no such best but still...) B Trees. B-Trees are specifically designed for managing indexes on secondary storage such as hard disks, compact discs, and so on, providing efficient insert, delete, and search operations. Like binary … |
The End.