49,761 Topics
| |
Im trying to insert items into a BST from a txt file. For arguments sake the data file is just the integers 1 2 3 4 5 6 7 8 9. When i try to do a inorder traversal, all that is outputting is the first and last number. I … | |
Is there any way to inline just some selective calls to a particular function not all of them? by function I also mean class operators like assignment operator, constructors like copy constructor. The only form I know is declaring function as such at beginning and that's supposed to effect all … | |
Hi guys, I am writing project for bank operation in MFC, before running my application i have to check the username and password. But i have some problem in my code, my main frame window is closed after enter username and password.Any one tell me the reason..... [CODE] class CLoginDialog … | |
Hi all! I am trying to manage and understand dates with c++, but the output that I am having does not help much. Basically I would like to adjust a localtime that can be seen in the string "s_prueba_time" to a UTC time (in my case -2 hours in summer … | |
Sorry if this is repetative but still struggling with this. i wish to multiply 2 long integers together. if the result is outside of int64 range i want the loop to break otherwise i want to keep the result and increment the second number. have tested this, but when the … | |
Hello I'm looking for the correct method/way for reading & writing raw JPEG image binary data. I am obtaining the raw data via TCP stream, the official JPEG specs say that the raw JPEG image data starts at HEX value 0xffd8 & ends at HEX value 0xffd9 as below... [CODE]Start … | |
Hello. Can anyone please tell me if there are any sites where i can practice programming? i mean sites like TopCoder, SPOJ, CodeChef. But i needed a site where there is an explanation for problems(so that i can understand the basic algorithmic concepts) and then go on practicing it. i … | |
Hi I'm looking for good tutorial/s about using boost::regex with c++ code examples any links would be really helpful... Many Thanks Steve PS not tuts about setting up boost, done that already. | |
HI Friends i have create this simple code in visual C++ [CODE]#include<iostream> int main() { std::cout<<"Hello World!!"<<std::endl; system ("PAUSE"); return 0; } [/CODE] can anyone help me to write log file on base of this please | |
Hey guys, I just reinstalled MS Visual Studio C++ Express and I am having this weird problem with the complier. So for example if I add a source file name file1 and run it it works fine..however if i delete the file1 from current project and add file2 it will … | |
Hello everyone: I'm a C++ newbie. I have written code for performing calculations that needs data from another code. These data are in text files. I know how to read in an ENTIRE text file, but I can't figure out how to extract certain pieces of it. I would very … | |
I am using an overloading operator to add two polynomials. I have gotten it to work, but I am wondering if I can improve on my if statement by not changing the value of degree for the rest of my program. The if statement is used if the second polynomial … | |
Hey there, I'm having trouble getting my program to read the last instruction of the file, and so far, I haven't been able to figure out why. Any help would be appreciated. [CODE]/* The Simpletron Machine Language Program. The purpose of this program is to simulate a primitive computer. This … | |
hey need some help with my loan program i have two problems how do you add the total of the variable sumtin from a while loop and i need to show the inital loan first then after the calculations are done show it again like i want it to show … | |
I am multiplying two polynomials and cannot figure out how to add the exponents. The loop is to multiply the coefficients and degree is for the total degrees used in the polynomial. But I can't figure out what I should use to add the exponents. [CODE] Poly Poly:: operator*(const Poly& … | |
I have recently voluteered to be a mentor for a local inexperienced FIRST robotics team. The main area I will be mentoring is the programming aspect of the competition. The controllers for last years robot was programmed using LabView but they also can be programmed in C++. The better teams … | |
#include "stdafx.h" #include <iostream> using namespace std; void main(); int _tmain(int argc, _TCHAR* argv[]) { double sum_positive=0,sum_negative=0,sum_total=0,num; int total_negative_number=0,total_positive_number=0; cout << "Enter number.\n" << endl; for (int i=0;i<10;i++) { cin >> num; sum_total +=num ; if (num>0) { sum_positive+=num; total_positive_number++; } else { sum_negative +=num; total_negative_number++; } } cout <<"Sum … | |
I am writing a program where the user inputs two polynomials, then the program adds them, multiplies them, and evaluates one of them. I am having two problems. First, I can't think of how to add the exponents in the overloaded method for *. Second when the two polynomials multiply … | |
Forgive me again, I'm a complete noobie at Visual Studio, even though I have been using PHP for years. I need this for my new job and the classes (public, private, etc) are really a bit confusing. Suppose I'm trying to make a new windows form, and I have various … | |
If I have 4 person. How do I create a function that can determine the oldest person below? Person p1("JAck","Spice","48); Person p2("Burn","Side",53); Person p3("Leppy","Doopy",20); Person p4("Jimmy", "Dean", 32); I need someone to help me explain how "for" loops work. | |
I have an assignment that i need to do and i have no idea how to do this, I was hoping someone would be nice enough to help me out, its a begginner program that needs to be done in visual stdio c++: Heres the assignment: Try to write a … | |
Hi, I have a button control where I retreive 2 strings with 2 URL like in the code below. What I wonder how it is possible to do, is how to open up [B]1 browser [/B]window with 2 Tabs where 1 Tab is [url]http://www.google.com[/url] and the other [url]http://www.yahoo.com[/url] How can … | |
Hi everyone, So this is my first post :S and as you will probably tell from my code, I'm pretty new to coding in c++. My main areas are web and online video streaming and encoding etc. however I have taken it upon myself to learn c++. This is part … | |
I am trying add two polynomials by overloading the + operator. When I run the program it only adds the first coeficients. I cannot figure out why it is only returning the first coeficient. [CODE] //header file #include <iostream> using namespace std; #ifndef _POLY_H #define _POLY_H const int CAPACITY =100; … | |
hi, i have this code: [inlinecode] HINSTANCE hComponent = ::LoadLibrary("Component1.dll"); [/inlinecode] i get this compile error: Error 1 error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'const char [15]' to 'LPCWSTR' c:\Documents and Settings\Administrator\Desktop\Component1\Client1\Client1.cpp 9 so i changed the code: [inlinecode] HINSTANCE hComponent = ::LoadLibrary((LPCWSTR)"Component1.dll"); [/inlinecode] however GetLastError returns … | |
Hello everyone this is my first post on the daniweb community. Currently I am home sick with a nasty cold so I was trying to solve a programming problem on a wonderfull sight called Project Euler. The problem is as follows: If we list all the natural numbers below 10 … | |
Hi- Trying to rename a file using the rename() function. It works, but it appends an '@' to the end of the renamed file. Here's my code: [code=c] char oldname[] ="file1.csv"; char newname[26]; newname[0] = '3'; newname[1] = '1'; newname[2] = '1'; newname[3] = '3'; newname[4] = '3'; newname[5] = … | |
please give me a code for this problem..... Objectives: To implement retrieving of data from text file to a record To implement storing of updated data from the record to a text file Procedure: 1. Create a structure for a simple telephone directory system named struct telDirectory{}composed ofchar username[20], long … | |
I am getting the following error when I try to access my Resource Files in Visual C++ v6 "The file is already open in an editor." I've tried closing all windows in the IDE and closing the project, even tried logging out and back in. All to no avail. A … | |
Hello to everyone, Well I'm a noob to C++, I just started two weeks ago, I'm trying to get a good head start before I start college next semester. I've done simple programs, but now I'm trying to create a body fat percentage calculator I guess you could say. but … |
The End.