51,593 Topics

Member Avatar for
Member Avatar for matthewjay54

Hey, if anyone can help me, Im in an intro to C++ class, and I was having problems with writing a program that converts seconds to Y M D H Min Sec...and I have no idea where to start..can anyone help me???

Member Avatar for np2100
0
95
Member Avatar for driplet

In FORTRAN, we can have a common data block in which all exchanging data are stored. When a subroutine/function needs data from the data block, it can automatically get them from the data block if the program found data with the same variable name. In C++, I am wondering how …

Member Avatar for Ancient Dragon
0
118
Member Avatar for beast

yo i got this code right [code]#include <iostream> using namespace std; class Complex { double real1, real2, imag1, imag2; public: Complex(double, double, double, double); double addcomplex () { cout << real1 + real2 << " + " << imag1 + imag2 << "i" << endl; } double subcomplex () { …

Member Avatar for sarehu
0
143
Member Avatar for scru

Can somebody go into detail with me about what I need to do from scratch to the point where I can hit build and run and successful compile a valid C++ program without any build/linker errors? I use Windows Vista.

Member Avatar for scru
0
122
Member Avatar for Thew

Hi, I need to resolve this problem: I need to create string array that contains another string array. For example, it can be like this: [products] => [name][version] so products[5][0] gives you a name of the 6th product and products[5][1] gives you a text version of the 6th product. Maybe …

Member Avatar for Lerner
0
128
Member Avatar for darussalaam

How to solve this equation using functions in c++; y=x/2+3∑(i=1,m){2*i+b)-4∑(i=1,m+2){i/a-b) please who can solve it today it will be so helpful for me. Regards

Member Avatar for darussalaam
0
77
Member Avatar for olams

I urgently need help with this program that i wrote. it is an expandable array. it performs different functions as shown below. I have shown the outputs of the code below. My problem is with the output of the compLfact(int) function. How do i get rid of the leading zeros. …

Member Avatar for olams
0
99
Member Avatar for honeyS

WHere can i get free reference on commands and syntax for Borland C++ builder 6?? Specially commands for internet applications..

Member Avatar for WolfPack
0
61
Member Avatar for fishsqzr
Member Avatar for fishsqzr
0
75
Member Avatar for k2k

Can I have regular function and class function together? if so, where should i place the regular function declaration? The compiler wouldn't compile this one... the problem is function showlist() Thank you [code=cpp] # include <iostream> # include <string> # include <fstream> using namespace std; class Name { public: int …

Member Avatar for Lerner
0
105
Member Avatar for Ukiya006

Hi, I need some help here.. I am pretty new to doing ASP.net in C#.. and also pretty unfamiliar with javascript Currently i am facing some problems which i hope you guys can help me in solving.. I have dynamically created a row of buttons. [code] for (int i = …

Member Avatar for SheSaidImaPregy
0
119
Member Avatar for mr.cool

i want to return 2 values but i don't know how i can do that. this is part of what i have done, i want to have choice[0] and also choice[1] be returned. also how can i store them in 2 different variables in the main. [code] int pick() { …

Member Avatar for invisal
0
91
Member Avatar for Suraine

Dear c++ gurus, i have thk all over wat is means by the following hightlighted text, but not understood, can anyone explain to me what do they mean? or how do they function? [code=cpp] class RotationSensor : public Sensor { public: RotationSensor(const Port port, int position = 0) : Sensor((Sensor::Port) …

Member Avatar for Suraine
0
134
Member Avatar for kelvinskk

Hi, I'm still pretty new to c++ programming in Fedora Core. I've successfully done up my c++ code and it can run when i did: gcc -o test test.c ./test However, is there a way which i could run this test file from any directory? For example, u can run …

Member Avatar for WolfPack
0
139
Member Avatar for #include<DAN.h>

The easiest way that I've seen to make sounds with C++ is with [code]Beep (frequency,duration);[/code] But, I've run into a snag. This command only outputs to the internal speaker which was all good on my old computer, but on my new laptop I either don't have an internal speaker or …

Member Avatar for Salem
0
96
Member Avatar for xeroz

I ahev to make a project of daewoo a bus servise reservation system in c++ please help me so that i would make it in a better way thanks xeroz

Member Avatar for wamuti
0
251
Member Avatar for Jishnu

Can ne-1 explain 2 me the output of the following code ? (Mind well, it's completely legal C code !! ; n it actually won the International Obfuscated C Code Contest.) #include<stdio.h> main(t,_,a) char *a; {return!0<t?t<3?main(-79,-13,a+main(-87,1-_, main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a )&&t == 2 …

Member Avatar for Jishnu
0
223
Member Avatar for Deiwos

Hi folks. I'm having some trouble with a program I'm working on. What it is is a chatbot based on eliza. Part of the program tokenizes what ever the user inputs. The problem I'm having is that the tokenizeing function stores the input into a vector. What I need to …

Member Avatar for Rajith Cherian
0
92
Member Avatar for mrjoli021

Is there a tutorial on learning to work with api's. I am trying to automate a telnet connection to a router. I figured out how to telnet, but how to i type the commands inside the telnet session.

Member Avatar for WaltP
0
88
Member Avatar for SHWOO

I am trying to create a set of functions to allow the user to output a string to a file name EngineLog.txt It compiles fine, but I get an Unhandled exception at 0x00444c36 in Test.exe: 0xC0000005: Access violation writing location 0x0000000d. This occurs in the EnableLogging() function. [CODE]//----------------------------------------------------------------------------- // The …

Member Avatar for SHWOO
0
199
Member Avatar for guitarrick

Still stuck on this one. I am not back in class yet. This is my personal research/review for the upcoming semester. I am not where I'd like to be with my review, but I really want to solve this one; but I can't seem to get started. Can someone please …

Member Avatar for superjacent
0
254
Member Avatar for The Midnighter

Alright, so I've got a linked list program going here, and I've succesfully loaded a text file, and I fed each line from the text file into my linked list nodes. Now I want to create a few commands that's going to allow me to alter this text file, while …

Member Avatar for The Midnighter
0
143
Member Avatar for FireSBurnsmuP

This is going to sound wierd at first, but I found a really cool usb controller. Let's see if I can find a link to it... [URL="http://www.bestbuy.com/site/olspage.jsp?skuId=8609696&type=product&id=1192233008066"]here it is[/URL] Now this is the wierd part - the first thing I thought when I saw this was "how sweet would it …

Member Avatar for Ancient Dragon
0
146
Member Avatar for k2k

First of all, i hope the [code] [/code] thing is what i was asked to do to encase the my code. And please help on the set() function. I don't know why the string type in the parenthesis gave me compile error undeclared identifier. thank you. [code=cpp] # include <iostream> …

Member Avatar for twomers
0
129
Member Avatar for k2k

Anyone please take a look at the set() ... i don't know what went wrong that string in the set() gave me compile error saying undeclared identifier, which shouldn't even be a variable [code=c++] # include <iostream> # include <string> # include <fstream> using namespace std; class Name { public: …

Member Avatar for k2k
0
232
Member Avatar for Clascli

Hey, I'm performing research on tracking applications using video cameras. My background however is civil engineering, so my programming experiece is limited. I'm starting to play around with Visual c++ but haven't found a way of opening a live video stream (my cameras are connnected to a network) in a …

Member Avatar for twomers
0
85
Member Avatar for jmvr_danga_14

Hello! im new here and i have a problem regarding programming. We are required to compute for the distance of a certain city to another city...for example whats the distance of new york to los angeles..then the program will compute its distance... the output of the said program should be …

Member Avatar for WolfPack
0
2K
Member Avatar for Thew

Hi, ahm, I'm trying to make dll that will have 5 simple functions. For example bool GetHTTPResponse(string url, string *buffer); So, my DLL includes curl DLL, that includes 3 anoother libraries. I just created simple function with name GetHTTPResponse, here is the source: { cout << "Test" << endl; return …

Member Avatar for Ancient Dragon
0
144
Member Avatar for cbattagler

Hello, I am having trouble with the memory size of an array I am using. At the moment I have an array to pointers of objects. These objects get read in from a file and sorted, then a new file is outputted after some filtering is done on the array. …

Member Avatar for cbattagler
0
190
Member Avatar for merrona

:icon_question: Hi friends i have got a problem on the template class. that is why do i need to declare the key word [B]template<class t>[/B] on every function defintion of the member function. since we have declared it as global declaration on the top of the class.

Member Avatar for Narue
0
99
Member Avatar for WhiteHatHacker

I'm only a few days new to C++ and I'm working on a program where I need to give commands and a coresponding function is called. At the moment the code uses the given string and goes through "if string = functionname then..." but I am trying to be more …

Member Avatar for WhiteHatHacker
0
81
Member Avatar for sweRascal

Hi all, I am a novice c++ programmer with php experience and am trying to learn to do some usefull stuff in c++. To learn I try to write a chat client with a mySQL backend and so far it works great. To make it useable I need to get …

Member Avatar for Narue
0
3K
Member Avatar for Convert

I am converting from VB to VC++ (which might give you an idea of why I would be asking stupid questions). I already have a working Win32 program written using VC++ and I now need to create Drive, Directory and File List boxes that allows the user to select a …

Member Avatar for Ancient Dragon
0
117
Member Avatar for chihuyu

Hello,I am new for C++.The following are the codes I wrote to calculate the sum of 2^n. The result is 2046 after running the program.That is correct. But when I change the condition to n<=100,the result comes with -2,which is obviously wrong.Then I tried different n and found if n<=30,the …

Member Avatar for technogeek_42
0
124
Member Avatar for microgoogle

hi all Following is the code which is giving me the aforesaid error : [code] #include "MessageHeader.h" #include "MessageProcessor.h"//contains the class MessageProcessor .. class RequestCacheHandler { private: public: /*********************************************************************** * Functions related to handling of requests ***********************************************************************/ MessageProcessor msgRequest; TcpPacket tcp; ..... ..... .... [/code] Am i missing something? plz …

Member Avatar for Salem
0
97
Member Avatar for k2k

hi, i have a txt file "names" containing 300 set of personal info such as: 3765 // id thomas //last name barry // first name 876-988776 //phone number 16.37 // a price of what he purchased 8765 // id repeat dionisio // last name repeat tom // first name repeat …

Member Avatar for WaltP
0
91
Member Avatar for honeyS
Member Avatar for nu2cpp

Hi I am using BCB6 and have a memo component in my project. I want to change the color of a line(font color) depending on my message I need to display i.e. red color when I need to show an error message and black when no error. But when I …

Member Avatar for nu2cpp
0
116
Member Avatar for kami7125

Hello. I would like If possible get some input and assisstance on operations with external files. So this is what i have so far: [code=cpp]#include <iostream> #include <fstream> using namespace std; void main (){ cout<<" Input into the file '.' " <<endl; char zbor[20]; ofstream dat; dat.open("tekst.txt"); do{ cin.getline(zbor,20); if(strcmp(zbor,".")){ …

Member Avatar for Ancient Dragon
0
125
Member Avatar for Selrahcthewise

i started to put in the hello world code in my compiler and i've tried to build it and it pops up this message error C2447: '{' : missing function header (old-style formal list?)how do i fix it here is the code [CODE] #include <stdio.h> ; int main (void) ;{ …

Member Avatar for Narue
0
89
Member Avatar for Red Horse

This code hangs on me running. The problem is that "r" does not count right (not like it is directed under FOR expression). Does the problem lay beyond the code? #include <iostream> #include<string> using namespace std; // using std::cin; // using std::endl; // using std::cout; // using std::string; int main() …

Member Avatar for Red Horse
0
99
Member Avatar for bigbadowl

Hi there I'm trying to learn how to do classes in C++ while working on a project. I have some code (below) which fails to compile with the error (below) Any help would be appreciated. Many thanks [CODE]packageType.cc: In static member function ‘static packageType* packageType::fromString(std::string)’: packageType.cc:20: error: request for member …

Member Avatar for bigbadowl
0
90
Member Avatar for rajatC

hi! i want to change the icon of an exe file. And the file will be moved from computer so the icon must be embedded in the exe file...is there any way?? the exe file is a daily use application so i want to give it an icon which shows …

Member Avatar for Duoas
0
375
Member Avatar for rajatC

hi friends... i have some doubt regarding the output at the console. what we generally have is that the output is written on the console and the cursor moves always forward. But what if in some special case we want to back track the cursor a few characters of lines …

Member Avatar for rajatC
0
133
Member Avatar for legendarya49

I'm am trying to write a program that will do the factorail of big numbers and yet i still can not figure out why it does not work. when i do the factorail of 5 i get 20 it should be 120 and i cant figure out where the bug …

Member Avatar for JRM
0
90
Member Avatar for Sandman13

im so new here i dont know if this is the right place to ask this or not but here goes>>> i need to learn how to right a code for sum thing and in C++ im so lost on how to do this is there sum1 here that wouls …

Member Avatar for ithelp
0
106
Member Avatar for sweRascal

Hey all, sorry to bother you but I have been wrecking my brain with this issue. I have been programming php for several years and needed some portable console apps so my natural choice was to go to c++. Now I got stuck when trying to create an sql query …

Member Avatar for sweRascal
0
111
Member Avatar for dipthought

I have a code where I use a pointer to access some datablock. Now in some rare cases, some members of the datablock are empty and as a result the pointer becomes dangling. Infact when I print out the address of the pointer, I get something like, address = c0d6940 …

Member Avatar for Salem
0
105
Member Avatar for abeshare

// I want to dislpay my cout in an acsending order by ssn // here is the program [code=cplusplus] #include <iostream> #include <cstdlib> #include <string> #include <fstream> #include <math.h> #include <ctype.h> //Ebrahim Sharif //ECE 370 //1-16-2008 using namespace std; void getPersonalInfo();//function prototypes int Str2Int(string InpStr); long Str2Long(string); void lookupPerson( char …

Member Avatar for Nick Evan
0
122
Member Avatar for Narue

Post your tips for making life easier in C and C++. I'll start: [SIZE=3][B]Standard vector object initialization[/B][/SIZE] The biggest problem with the standard vector class is that one can't use an array initializer. This forces us to do something like this: [code] #include <iostream> #include <vector> using namespace std; int …

Member Avatar for bector
2
8K

The End.