51,593 Topics
![]() | |
| |
Some things you need to know: [LIST] [*]This code is not efficient, if you want a more efficient solution, then turn to the STL algorithm [URL="http://www.cplusplus.com/reference/algorithm/next_permutation/"]next_permutation[/URL]. [*]When there are double characters (i.e. characters which occur multiple times) in the string to permute then some permutations will be generated multiple times. … | |
i programming in c language and i need to using parallel port the compiler that i using : "microsoft visual C++" int the old compiler i using this command : inport(0x378) but now in vc that not work please help me... | |
Hi I'm building a webservice in axis2c and wanna test it with a client. I build the skeleton code for the client using the wsdl2c tool in axis. Now, when I build the solution in Dev-C++, I get a lot of linker errors like the one mentioned in the title: … | |
[b]Split from - [url]http://www.daniweb.com/forums/thread34812-2.html[/url] [/b] hi can you help me with my problem in c++ coding? my problem that in every two zeros it must fallowed by 1, to become valid if the input is not 001 like this it becomes invalid..... example: 001001001 - valid 001010001-invalid ![]() | |
how to search the file using the C#.net windows application ? | |
hi i m mahesh i want to knw about the project on media player[QUOTE=mattybennett;660156]Hi all, Ok - there's nothing like a BIG challenge to start off my exploration into programming. Given that I'm a complete newbie with more build errors than a builder having a bad day (bad pun!), what … | |
I am stuck with one problem , please anyone help me to do this . The question is Write a function to modify a list ( [I]one dimensional array[/I] ) of numbers such that every number is replaced by the average of its immediate neighbours ( [I]the value just above … | |
/*I am a noob and can not seem to be able to pass a random number to cout. I have tried everything amd am looking for a little guidance*/ [CODE]#include <iostream> #include <ctime> using namespace std; class Fraction { private: int num; // Numerator int den; // Denominator public: int … | |
had to do a program that did a binary search for the number 5 but for some reason its not being found...here's my code whats wrong.. [code] #include <iostream> using namespace std; const int SIZE=15; int binarySearch(const int, int, int[]); int main() { int posints[SIZE]={10, 36, 87, 95, 100, 110, … | |
In this class, line 3 "char * pName" and last line "char * name" pName and name are pointers or strings? I think they are pointers but if they are pointers how can we do strlen(pName) and strcpy(name,pName) in the code? Thanks class student { public: student(char * pName="no name",int … | |
Hey guys I overall got this problem solved it has to allow the user to input numbers to do artithmitic functions to fractions. And the whole mathmatical works fine. But the professor wants it to loop, and i cant figure out a good way to loop it. The way the … | |
My teacher issued an assignment for us to implement a stack and node class based off of his header files, and then to code a postfix expression calculator using the stack and node classes that we implement. When I tried to generate an instance of my stack class, VS threw … | |
Hey guys so have an assignment for my computer programming class, i was wonder if you could help me out. im really at a loss here haha, this is basically what i have to do and if anyone has a similar program that would help me out that would be … | |
Hello, I have a weird problem. I have a class implemented that looks something like the following: [CODE] class textBox { public: // default constructor textBox() { m_text = ""; } textBox(string text) { m_text = text; } string getText() { return m_text; } private: string m_text; }; [/CODE] Now, … | |
heres my code: [CODE]#include<iostream> #include<string> #include<iomanip> #include<fstream> using namespace std; struct WeatherInfo { string City; //Name of the city double Rainfall; // Total rain fall of all citys double High; //Highest temperature of all citys double Low; //Lowest temperature of all citys double Average; //Average temperature of all citys }; … | |
[CODE]#include<iostream> #include<cmath> using namespace std; int main() { float user1; float user2; float sum; char choice; for (;;) do { cout<<"Calculator"; cout << "Enter your first number" << endl; cin >> user1; cout << "Enter your function \n"; cout << "+ \n"; cout << "- \n"; cout << "x \n"; … | |
Nevermind. No one answered but I got it now. | |
hello , I am creating a map format for a game I'm making and I'm hoping to use xml. Can anyone tell me how to access elements using tinyxml ? or at least how create some sort of pain text parser ? Thanks in advance ! A Novice C++ Programmer | |
ok so i need to create a cell class for a tic tac toe game. the cell class should have a row, column coordinate, and an internal and external display value. heres what i have so far. can anyone give me some hints or point me in a direction where … | |
ok so i worked on this during lunch at school since i was bored, but here it is so far. [CODE]#include <iostream> #include <cmath> int main() { using namespace std; int badguy1; int action1; int action; int att; int def; int health; int shop; int action2; int action3; int action4; … | |
Hi everyone, I have to display a binary search tree in a tree format. For BST insertion, if the input contains the following F D R P V M N The resulting BST should be displayed as: [CODE=text] F +-- D | +-- NULL | \-- NULL \-- R +-- … | |
Hello all, I am a major noob a C++ and need some help with managing case. we are to write program that asks the user to enter a temperature and a single letter, F for Farenheit or C for Celsius. The program should manage the upper or lower case input … | |
I have a homework assignment for my algorithms class, we need to take up to 10 user inputted locations and then plot out the route from a static point, displaying every possible route to take. What I'm wondering is is there a way to randomly display a string array and … | |
Hi, I am trying to comprehend how exceptions work in c++. However I don't understand why a divide-by-zero exception es not caught by a catch. I attach de code to a better a explanation. [CODE] #include <iostream> //#include <exception> #include <string> using namespace std; int main () { int num1, … | |
Alright, this is the best text based RPG I have created, and I have refined all the bugs and such. I have gotten a few questions on whether it is beatable without dying, and it IS beatable without dying, but be aware that you most likely will die quite a … | |
Hi every body... this(attachment) is my code for implemention of Huffman code,this code must read every file and compress them, it works on many test file but if I input test.txt it give an Error... How can i solve this error ... and the next problem is if we input … | |
I'm currently working on a project that makes use of the FIX protocol and my role in my group is to work on decoding information that would be sent in the data stream but, after reading many of the specification docs on fixprotocol.org, I am still at a loss as … | |
I created a c# graph. But, first time it is loaded, it is not show in the correct format(Pic1). For second ,third ,fourth etc time, it is shown in correct format(Pic2). | |
Hi everyone, new to the DaniWeb community, i have always used it for homework help in the past, but i'm about to rip my hair out if i stare at this code for another hour. basically the project is to write a code that reads data from a file, gets … | |
hey, i came across this program linked linear list about nodes and all and i m literaaly flustered @ understanding it(only the code in LLLIST.CPP----i mention below)....specially with the POINTERS... SO PLZ CAN ANYONE EXPLAIN ME THE WORKING OF THE CODE IN LLLIST.CPP, THAT I HAVE MENTIONED BELOW:icon_cool:.... MAYBE I … | |
Can anyone post me C++ implementation of AVL tress with insert and delete operation in C++ without using templates... I did a lot search in the internet but couldn't find one... please help me as soon as possible... | |
Hi all, Does anyone know how to create sessions with c++ cgi? I am using c++ cgi to connect users from web to IMAP server. How can create sessions so that next cgi knows which user is this, etc. Thanks, nadz | |
For reading from an xml file, [CODE] char s[6]; ifstream x("output.xml"); x.getline(s,34); [/CODE] char s[6]; I don't want to specify the maximum number of characters in 's'.So,I tried to use string s instead,but getline only takes character arrays. When I used char*,it said,The variable 's' is being used without being … | |
When I debug my program, I get this error: Unhandled exception at 0x004d2776 in engine.exe: 0xC0000005: Access violation reading location 0xccccccd0. This is the stack trace: [code]> engine.exe!CEntityController::SpawnEntities() Line 18 + 0x24 bytes C++ engine.exe!CEntityController::Start() Line 50 C++ engine.exe!DarkGDK() Line 21 C++ engine.exe!_WinMain@16() + 0x13 bytes C++ engine.exe!__tmainCRTStartup() Line 263 … | |
I am new to programming. If it's a dumb question please forgive me for wasting a thread. But I wanna know. Why is this code not working? [CODE] int main() { char sndex[6][8]; sndex[0]={"BFPV"}; sndex[1]={"CGJKQSXZ"}; sndex[2]={"DT"}; sndex[3]={"L"}; sndex[4]={"MN"}; sndex[5]={"R"}; [/CODE] The Compiler (MingW + DevCPP) is showing this: [CODE] In … | |
can anyone help me initialize this array with nested for loops? [CODE] char board[3][3]; board[0][0] = '1'; board[0][1] = '2'; board[0][2] = '3'; board[1][0] = '4'; board[1][1] = '5'; board[1][2] = '6'; board[2][0] = '7'; board[2][1] = '8'; board[2][2] = '9'; [/CODE] | |
I am trying to insert elements in a binary search tree.I am getting the following errors: In member function 'void bst::insert(char*)': error: cannot convert 'char*' to 'node*' in assignment error: cannot convert 'node*' to 'const char*' for argument '1' to 'int strcmp(const char*, const char*)' In function 'int main()': error: … | |
I want to take infinite number of strings using string class. Why string operator is not working in the following program? it is showing... error: no match for 'operator!=' in 'str != -0x000000001'| [CODE] #include<iostream> #include<vector> #include<string> using namespace std; int main() { vector<string> s_v; string str; for( ; ;) … | |
hi i am trying to write a simple calculator.i have posted the code below,it works fine for one time solution. but i want the answer to be used for next calculation and also want to put a code to end the program. [CODE] int A,B,C; char op; cout<< "Enter a … | |
[CODE]#include <iostream> #include <ctime> using namespace std; class Fraction { private: int Num; int Denom; public: void Reduce(); //will reduce the fraction to lowest terms void AddFraction(); //will add the two fractions together void print(); //will print the fraction in the form: numerator / denominator }; void Reduce(int &Num, int … | |
I have two ever evolving variables that I want to compare. Call them x and checksum. If the two variables are within 100 of one another for example, everything is fine. But if the margin is greater than 100 I would want it to throw up an error. How would … | |
How is it possible that my program asked to cout a bool variable writes 104 on the display? Even if the variable wasn't initialized, it should display 0 or 1 I thought? Another thing is that it seems to be initialized and to go wild at one moment. | |
hey guys..ok so i did this problem about 80% but i cnt figure out the last part[I] which is sort the characters in order of increasing size. [/I] [B]Question:[/B] Input: 4 words (strings with no spaces) and the order in which they are to be displayed, forward alphabetical, reverse alphabetical … | |
Hello, I am trying to develop a program and I am stuck on a few portions. 1. I need the program to calculate the gradient of a user entered function. 2. I need to multiply matricies which I think I know how to do but the matricies need to have … | |
Hey guys, I have a program zipped and attached to this message. Can someone please run it on command prompt or cygwin or something and let me know if it works? I tried running it on it but for some reason it did not work but when I run it … | |
I need to develop a piece of code in an old legacy Visual C++ 6.0 system. I am invoking a stand-alone executable via a system call. This exe is supposed to create a file if processing goes OK or not create one if it fails. The name of the file … | |
Hi, apologies since I feel this is a very basic question... I need to feed a function that takes a few arguments, and I'm having trouble with one of the variables: my_function(..., ..., const char* const*, ...) I'm trying to initialize that variable like this: const char* const myVariable[] = … | |
Hi Guys.. I have a problem in tellg() function.. When I open file in Binary mode , It returns true value,but when I open in default mode it returns false value.I can't understand what has happened ...(the problem is in this code) : [CODE] for(int t=1;t<size;t++){ char ch=input.get(); codes_list[t].symbol=list[t].symbol=ch; input>>list[t].q; … |
The End.