51,593 Topics
![]() | |
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??? | |
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 … | |
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 () { … | |
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. | |
![]() | 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 … |
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 | |
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. … | |
WHere can i get free reference on commands and syntax for Borland C++ builder 6?? Specially commands for internet applications.. | |
Is there a way to see a list of the breakpoints (active or not) in C# Express? | |
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 … | |
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 = … | |
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() { … | |
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) … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … | |
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: … | |
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 … | |
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 … | |
![]() | 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 … |
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. … | |
: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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
How to fix error it sayTskindata not found? plss help me | |
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 … | |
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,".")){ … | |
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) ;{ … | |
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() … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
// 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 … | |
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 … |
The End.