51,593 Topics

Member Avatar for
Member Avatar for corby

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 …

Member Avatar for corby
0
160
Member Avatar for Kombat

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

Member Avatar for Ancient Dragon
0
127
Member Avatar for techie929

//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; …

Member Avatar for VernonDozier
0
96
Member Avatar for nola_Coder

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 …

Member Avatar for nola_Coder
0
499
Member Avatar for Der_sed

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 …

Member Avatar for WaltP
0
87
Member Avatar for rwill357

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 …

0
58
Member Avatar for whaug000

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 …

0
42
Member Avatar for Frederick2

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 …

Member Avatar for Fbody
0
148
Member Avatar for yznk

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 …

Member Avatar for jonsca
0
110
Member Avatar for nats01282

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 …

Member Avatar for nats01282
0
148
Member Avatar for mushroozard

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 …

Member Avatar for Fbody
-3
253
Member Avatar for indigo.8

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 …

Member Avatar for indigo.8
0
114
Member Avatar for photoyid

[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; …

Member Avatar for photoyid
0
171
Member Avatar for lismoker

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 …

Member Avatar for Fbody
0
139
Member Avatar for TheWolverine

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 …

Member Avatar for dusktreader
0
150
Member Avatar for Robyy14

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 …

Member Avatar for dusktreader
0
147
Member Avatar for its_yogy

[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 …

Member Avatar for WaltP
0
303
Member Avatar for madmonkey

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.

Member Avatar for madmonkey
0
120
Member Avatar for TheWolverine

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 …

Member Avatar for Fbody
0
293
Member Avatar for FatimaRizwan

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 …

Member Avatar for Fbody
-1
122
Member Avatar for anthony5557

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 …

Member Avatar for Fbody
0
209
Member Avatar for Robert1995

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 …

Member Avatar for Fbody
-1
85
Member Avatar for sblass92

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. …

Member Avatar for sblass92
0
182
Member Avatar for suncica2222

Can I get some link or reference how to pass strings between two .exe's through their resources? In C++ of course.

Member Avatar for suncica2222
0
88
Member Avatar for callister

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++) …

Member Avatar for WaltP
-1
99
Member Avatar for Eternity[LK]

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 …

Member Avatar for Eternity[LK]
0
116
Member Avatar for mikabark

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; …

Member Avatar for Clinton Portis
0
3K
Member Avatar for bobbuilder67

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 …

Member Avatar for Fbody
0
119
Member Avatar for jamesbraders

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 …

Member Avatar for jonsca
0
268
Member Avatar for em-kay

[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??

Member Avatar for Clinton Portis
-4
92
Member Avatar for sidra 100

plz chk[CODE]#include <iostream> using namespace std; main() { int a; int b; cin >>a; cin >>b; int i; for(i=1; int<=b;i=i+1) { cout <<a<<"*"<<i<<"="<<a*i; } } [/CODE]

Member Avatar for Grn Xtrm
-4
78
Member Avatar for Chichiro

Hi all , i recently has read about some posts related to the above title , but i'm really confused about it,sadly :( What is the real difference between programming and software engineering? Which one should i go for ? If i took software engineering , could i be a …

Member Avatar for Chichiro
0
387
Member Avatar for cs_stud

Hi! I'm a BSCS student and currently working on an assignment about queues. We were tasked to solve a bank simulation problem. I got the header files for the teller and customer and both compiled successfully. Here are the header files: Customer header file: [CODE] //Header file cust.h #include <stdlib.h> …

Member Avatar for cs_stud
1
618
Member Avatar for vbx_wx

hello,i am trying to send a file from client to server and my send() function its working,its sending teh data,but the recv() doesnt work and it gives me the error : Transport endpoint is not connected Tell me if you need the code...thanx

Member Avatar for Clinton Portis
0
47
Member Avatar for ashishchoure

Hi, I am using CArchive class to transfer file in my chat application . The problem is that when i send data through CArchive write and flush, the CArchive Read gets hang in last transmission. I've gone through msdn [URL="http://support.microsoft.com/kb/192704"]http://support.microsoft.com/kb/192704[/URL]. it is telling that it requires one more flush or …

0
75
Member Avatar for data4use

Hi everyone, I wrote a dll which is export char* like; [CODE] extern "C" __declspec(dllexport) char* Test(void) { char* cts = "hi"; return cts; } [/CODE] and import the dll on vb.net like; [CODE] Declare Ansi Function Test Lib "[Path]" Alias "Test" () As String [/CODE] and call like; [CODE] …

Member Avatar for data4use
1
151
Member Avatar for wolfkrug

Hi I use visual studio to make my programs. I know that to copy the output of the program, you have to right click, mark, highlight, and then copy. But almost all the time when I try to paste nothing happens, and by that time the output box disappreared so …

Member Avatar for wolfkrug
0
108
Member Avatar for jimJohnson

I am writing a program and stuck on a part of my coding. This part of the instructions say the following... 11 - User can only withdrawl $300 amount per day I guess my problem is I am not sure how to set this up where it is linked to …

Member Avatar for VernonDozier
0
480
Member Avatar for chinnaedu

Helo all... i am working on LIVE555,on RTSPClient and RTSPserver......i need little help in compiling OpenRTSP using visual Studio..i tried compiling but there 6 link errors in it..... So anyone who worked on it please do assist me.....I even tried in LIVE555 Forums also/....There's nothing much help from that forums....and …

0
59
Member Avatar for nola_Coder

I've finally got my game scrolling sideways, but... 1) There's a really bad flicker to the whole screen. 2) Also, how do I get the background to loop? 3) The whole thing seems to run quite a bit slower than before I added the background. Why is that? How do …

Member Avatar for nola_Coder
0
175
Member Avatar for nsjoe

This is probably a simple fix but I can't quite figure it out. How can I find an escaped character in in a string? E.g. string str = "abcde\tfghi"; [CODE] while (str [counter] != '\t') { counter++; } [/CODE]

Member Avatar for Dave Sinkula
0
143
Member Avatar for mmgoicochea

This program will calculate commision based on the value of sales made... im getting three errors so far... 1>h:\cs110\assignment6\assignment6.cpp(22) : warning C4700: uninitialized local variable 'third' used 1>h:\cs110\assignment6\assignment6.cpp(22) : warning C4700: uninitialized local variable 'second' used 1>h:\cs110\assignment6\assignment6.cpp(22) : warning C4700: uninitialized local variable 'first' used. I was reading some books …

Member Avatar for mmgoicochea
0
166
Member Avatar for thedoodler

Design and implement an algorithm to solve this problem; your solution should use user – defined functions. Do not access global variables. Use parameters! (Suggestions: int function to determine lowest of two numbers, void function to print the message) Use function prototypes; the source code for functions should follow the …

Member Avatar for NathanOliver
-2
140
Member Avatar for Khazidhea

Hello, First of all, excuse my English =) Warning: wall of text\code. I must say I have some experience in Java and long forgotten C++, so right now I have some problems implementing the Huffman coding. The algorithm goes like this: I create an array of 255 elements to represent …

Member Avatar for Khazidhea
0
240
Member Avatar for fugnut

I would like the output of the following program to show the first integer without decimals and the rest will have 4 places..the way it is written now all outputs show as 1.0000 (or something similar) code is as follows [CODE]//Square root and cube root calculator #include <iostream> #include <iomanip> …

Member Avatar for NathanOliver
0
169
Member Avatar for TheWolverine

Hi all, I am just getting into the world of OOP and I'm not totally sure in what situations it's better to use objects and when it's simpler to just revert to arrays. For example, I am currently re-writing a bit of scientific code written in C that simulates the …

Member Avatar for TheWolverine
0
172
Member Avatar for emma88

Hello everyone, I am a student in a beginners c++ class and I need some help on an assignment I need to write a code that will "Write a program that reads in two positive integers that are 15 digits in length and then outputs the addition and subtraction of …

Member Avatar for NathanOliver
0
110
Member Avatar for newcuser

I really want to write this program in c without c++ coding. Please help me convert my code to c only. Here is sample input from a text file: alex busted marries marries test teste tested smile smiled works worked indexed hello kkked holddd smexexed whitespaced and Here is output …

Member Avatar for WaltP
0
171
Member Avatar for dchunt

My text file contents are in the form "00101010111101101011". I want to read it from the file and send each digit to an array,unfortunately i'm only able to use char while reading a file.How do i send each digit onto an array?a [code] #include <iostream> #include <iomanip> #include <fstream> #include …

Member Avatar for WaltP
0
116
Member Avatar for Matt323

Hi, i'm newish to this website, (i've googled a lot for answers to my questions and often came accross very useful answers to my problems on this website) and i'm also in the middle of learning C++. As i learn new things i decide to make little programs that actually …

Member Avatar for mitrmkar
0
386

The End.