49,761 Topics
| |
any help would b greatly appreciated for the following how do i modify this to output the date in multiple formats: a)DDD YYYY MM/DD/YY June 14, 1992 b) use overloaded constructors to create Date objects initialized with dates of the formats in part (a). c) create a date constructor that … | |
So I am trying to take my assignment and make it load an input file instead of having to input each value manually. How would I do that? Also if my program took arguments (p1a, inputfile, outputfile) how would I link that too Thanks | |
//when I delete root node from bst the below code is showing segmentation fault,Please tell where should I change the code [CODE] void BinarySearchTree::remove(char* d) { //Locate the element bool found = false; if(isEmpty()) { cout<<" This Tree is empty! "<<endl; return; } tree_node* curr; tree_node* parent; curr = root; … | |
I am working on my first scrolling game. I am pretty new to game programming in general, but have so far successfully made a couple very simple games. (Pong, etc.) I am using Dev-C++ and the Allegro library for this game. It's basically going to be a cat that runs … | |
Can someone please suggest me a psuedo code to extract sub problems from an arithmetic expression: For example, How do I remove (8*2) and (3+2) from a given string (5 + 6(3+2) - 2(8*2) +1) Input string will always start and end with paranthesis and the sub problems must be extracted … | |
I had to pick one inefficient and one efficient sorting methods, then implement them in a c++ program: Generate 100,000 or any proper number of random integers and store them in an array I have comprised two such function and just want to ensure I'm meeting specifications. Please see attached … | |
Problem Description In this assignment you are to write a program that encrypts an entire string, which could be multiple lines of text. Use the encrypted formula from last assignment to perform the encryption. The program will ask the user for a string to manipulate. The original string will then … | |
Recently I've been looking into BSTRs, and have found how 'touchy' they can be. I saw this in a COM class in the class destructor regarding a m_strBStr member... [CODE] if(m_strBStr) SysFreeString(m_strBStr); [/CODE] When I saw it I thought, "How would the BSTR have a zero assigned to it?", because … | |
Your assignment is to modify the program so that the aimless walker stumbles around in a 2-dimensional grid, such as the streets of Manhattan. Your program should prompt the user to enter the number of rows and columns in the 2-d grid. Again, have the walker start in the middle … | |
Hello i am watching some tutorials on [URL="http://www.3dbuzz.com/vbforum/sv_showvideo.php?v=27"]3d Buzz[/URL] and intro to C++ starts by saying that [CODE] #include <iostream> main () { std::cout << "hello world!" << std::endl ; } [/CODE] should show a CMD like window saying Hello World! On the video they try it and it works … | |
Hello guys i was wondering if someone could please post me a full FTP or SMTP uploading source code in C++ with all i need to #include.I just need a simple code to upload a file to my ftp server or send it to my mail.I searched the whole place … | |
Hi guys having a single problem with some code. The program is statically linked to another which is suppose to take an input from a text file into an array; and then return a pointer to the array to the main program. The text file contains 10 ints one per … | |
[CODE]#include<iostream> using namespace std; class point{ private: double x,y; public: double getX(); double getY(); void set(double c, double d); }; class polygon{ private: string color; public: void setc(string color1){ color = color1; } void print(){ cout<<color; } string getColor(){ return color; } }; class triangle: public polygon{ private: point v1,v2,v3; … | |
I am setting up a program that will read multiple lines of data from an input file. I am able to get it to read the first line (there are 6 lines of data) but I can not get it to loop. Also I am unable to get the floor … | |
Hi all, I have a simple mathematical series that I need to expand fully and I am not sure what the most efficient way is of achieving this. I know I can write a for-loop quite simply to do this but I don't know if a solution already exists in … | |
Hey I am pretty new to c++ and algorithmic , so please try explaining me what to do or give me a code for example don't redirect me to a site that already made a library for this because you only wasted your time telling me that. For example i … | |
[code] // This is My Client TCP program in C++ // Program Name client.cpp #include <winsock2.h> #include <iostream.h> #include <windows.h> #include <iomanip> char szServerIPAddr[ 20 ] = "192.168.5.251" ; // IP address of my Server int nServerPort = 5000 ; // The server port that will be used by clients … | |
I'm trying to make a button to open a new form in a Win32 Forms App. Lets say the form I'm opening is called Form2 and the button is called button1. Any help will be greatly appreciated. | |
Hi all, I'm busy coding up some classes now and I was wondering if there is any danger in using a variable name twice, if the variable is limited to local scope. For instance, let's say I have the following piece of code: [CODE] class Foo { void function1( double … | |
I have made an insertion sort function for a doubly linked list of polynomials , i cant figure out the error , please help me with it! [CODE]void insertionSort() { node* temp=head; while(temp->next != NULL) { node* second =temp->next; if (second->exponent==temp->exponent) { temp=temp->next; } else { second->previous->next=second->next; second->next->previous=second->previous; if (head->exponent … | |
Can anyone help me tweek my code. This program is supposed to get the day number 1 through 365 from the user and display the corresponding month and day. I'm getting so many errors I don't know how to start or really decipher the error in C++. Here is my … | |
Hello , i am looking just for algorithmic or ideas .Please help me I spent more than 3 days on this problem. 1) An overview of what your program does. My program works only for strictly pair k. 2) The result of your current code. My current code works for … | |
I'm trying to overload the << operator for a class (easy, right? :P) However, I get the linker error: undefined reference to `operator<<(std::ostream&, particle const&)' Which my understanding means the compiler can't find the implementation for operator<<. I'm not sure whats going on here, since I've already implemented the function. … | |
Can I get some link or reference how to pass strings between two .exe's through their resources? In C++ of course. | |
Guys..I'm trying to understand this coding and I can't understand the for loop. Can someone please explain it to me what happened there. Thank you[code]#include <iostream> using namespace std; int main() { long long int number; cout << "Enter number to test: "; cin >> number; for(int x=2; x<(number/2); x++) … | |
Hello. What I have to do is: Take the first half of the input, and output it backwards. Length of the input is 10 or less. Examples: 123456789 - entered by user; 54321 - result. abcde - entered by user; cba - result. The catch is, that I can only … | |
Hello .. I 'm doing sha1 program. I don't know why this source result show below errors. sha3.cpp:11: error: invalid conversion from ‘unsigned char*’ to ‘const char*’ sha3.cpp:11: error: initializing argument 1 of ‘size_t strlen(const char*)’ Thanks you. [CODE][/CODE] [CODE]#include <stdio.h> #include <string.h> #include <openssl/sha.h> int main() { int i; … | |
Hello Everybody, For a sorting project I'm working on, I have a string array, with 50 values. I need to convert each string in the array to a two dimensional char array. For example, Let's say there is a string array[50]. Each position in the array has a name in … | |
Hi, I am currently writing a program that requires me to take values from a text file and store them in an 2d array, I am quite new to c++ programming so I am not sure how to do it. My text file (posvalues.txt) looks like this: 0 0 0 … | |
[I]<<[URL="http://www.daniweb.com/forums/thread6542.html"]split[/URL]>>[/I] very intersting tutorial , thank u for it but i have one problem , how can i compare a string1 from a file with string2 from another file?? |
The End.