49,760 Topics

Member Avatar for
Member Avatar for Alex Edwards

Correct me if I'm wrong but... Each time I declare an object without assigning it a value, I am instantiating it (so long as the valid constructors is called upon doing so--) like... [code=c++] Triangle tri1 (3, 4); [/code] and this object exists on the stackk but only for the …

Member Avatar for Alex Edwards
0
208
Member Avatar for SakisLam

I am using Borland C++ Builder. I am trying to get the filename of an Image. How do I do that? (e.g Label1->Caption = Image1-> ????) Thanks a lot

Member Avatar for Ancient Dragon
0
34
Member Avatar for bravefanwill

How do you write a C++ program that converts uppercase letters to lowercase using the following function header: char upperCaseToLowerCase(char ch)

Member Avatar for Ancient Dragon
0
38
Member Avatar for wellibedamned

is there a way to "resize" a lib. string? is there a way to limit/set its size to a value? umm, and yeh, is there a better algorithm to search for all substrings in a string than this one i've made: [CODE] for( int i = 0; i < s.length(); …

Member Avatar for Ancient Dragon
0
96
Member Avatar for cheguashwini

Hello, I am new to proogramming and I need read the elements from two csv files into a 2 vectors and display the elements of vectors. The csv file is in the following fomat: 200, New york, -23.456, 23.455 201,Chicago,-34.5434,34.546 ..... ..... After that I have to perform string matching …

Member Avatar for VernonDozier
0
5K
Member Avatar for lahom

hi i created an application in vc++/MFC now iam using ado to connect to the databaase but there is aproblem i couldnot find any solution for it ....pleeease help the problem is this error : [B]error C2146: syntax error : missing ';' before identifier 'm_pConn'[/B] while iam defining : [B]in …

Member Avatar for mitrmkar
0
350
Member Avatar for marizion

recently i was reading a tutorial about the ole api and i think i managed to get through the whole tutorial but when i try to use some of the functions the tutorial uses like oleuninitialize then i get an error saying undefined reference i would like to know what …

Member Avatar for marizion
0
125
Member Avatar for kux

I need some guidance in a little project. I want to make a Document/View project that opens some planing files. I want the view for this files to be something like an excel sheet so you can modify the values of some fields and then be able to call some …

Member Avatar for Ancient Dragon
0
294
Member Avatar for QuantNeeds

Hello, I am having the following problem with calling my function to return the salary it calculated depending on the switch statement. I don't understand the error: ": error C3861: 'getSalary': identifier not found" [code] double Salary::getSalary() { return salary; } void Salary::compute() { cout << "Enter the employee's paycode …

Member Avatar for QuantNeeds
0
151
Member Avatar for mariaczi_pl

I have this error : "no appropriate default constructor available " in Form1.h. Form1.h [code] #pragma once #include <time.h> #include <windows.h> ref class CCenter; namespace RCK { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Summary for …

Member Avatar for mariaczi_pl
0
191
Member Avatar for sameeha

hello i have just started learning c++ .But Im not able to get any good compiler for c++.Can anyone out there help me by suggesting me a good website from where i can download c++.

Member Avatar for m4design
0
114
Member Avatar for Alex Edwards

The error is listed in the title and then commented in main (last comment). The program runs but once it encounters the bool expression I overloaded, it seems as if the program pauses. I have a feeling it's a stack overload due to the way my function operates, but I …

Member Avatar for Alex Edwards
0
81
Member Avatar for Kadence

I'm trying to use fstreams to read and write binary data to a file with the following code: [CODE]#include <fstream> #include <iostream> using namespace std; int main(){ ofstream out("test.data", ios::binary); for(uint i=0; i<10; i++){ uint outcount = i+100; out.write((char*)&outcount, sizeof(uint)); } ifstream in("test.data", ios::binary); for(int i=0; i<10; i++){ uint incount; …

Member Avatar for Ancient Dragon
0
83
Member Avatar for drichird

In VC++ 2008 Express, I open a new "Hello World" project (CLR Console Application). If I right-click the project in the solution explorer, and select "properties", I get a "... Property Pages" window which shows a line entry for: Configuration Properties / C,C++ / General / Additional Include Directories. It …

Member Avatar for Ancient Dragon
0
161
Member Avatar for kux

I have a vector<classType> vect in order to call sort( vect.begin(), vect.end() ), what needs implemented in the class classType? I have the overloaded operator< and a copy constructor, but the problem i get is that some member variables of classType that are pointers dereferenciate during the call to the …

Member Avatar for Duoas
0
115
Member Avatar for cam9856

Ok, I am building a text based rpg. This an excerpt from my code. at one point it asks what your name is. When you type that in I put it into a string variable called name but I want to be able to save it to a binary file …

Member Avatar for cam9856
0
140
Member Avatar for iansane

Hi, I have a readFile() function that reads a csv file into a vector. The first two lines of the csv are collum headings. After reading and displaying the file on screen, replacing ","'s with spaces, it asks if the user wants to append new entries. If yes, it calls …

Member Avatar for Duoas
0
139
Member Avatar for OnIIcE

i want to be able to create dynamic buttons. so ive used the code : [CODE]TButton* Btn = new TButton(this);[/CODE] my first question is: how do i assign a function to the dynamic button?! my second question is how can i put the code into a loop as to be …

Member Avatar for tabassam
0
90
Member Avatar for tabassam

i learn c++ chapter in objects and classes but i read previous chapter functins i have a problem i this chapter following code: [B][U]writer once time write the code:[/U][/B] return 0; [B][U]second time write the code in another programme:[/U][/B] return 0.569575 * pound this code programme in line 7. please …

Member Avatar for VernonDozier
0
75
Member Avatar for trailertrash

yes I'm tryint to learn c++ and I wanted to ask someone a question, I'm on functions, and so far when you do the return statement it says return 0,, and it started saying return and then a variable and the way it seems to say it , it changes …

Member Avatar for VernonDozier
0
119
Member Avatar for gang66

I have heard about the: char myline[100]; cin.getline(myline,100); but when my coding is long it doesnt work i gues as long as i would like it to? here is my code for example: [code] #include <iostream> using namespace std; int main() { int length; int width; cout << "Enter the …

Member Avatar for John A
0
108
Member Avatar for carobee

hi all i am using VC++ editor. Can anyone tell me how to insert sleep in my program? i have tried sleep(). but it is giving an warning 'sleep' undefined; assuming extern returning int. Thanks in advance

Member Avatar for Colin Mac
0
139
Member Avatar for mariaczi_pl

Hi !!! I have so strange problem... i dont know what i have to do.. Quote from[B] form1.h :[/B] [code] #pragma once #include "Center.h" #include <time.h> #include <windows.h> namespace RCK { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// …

Member Avatar for mariaczi_pl
0
173
Member Avatar for QuantNeeds

Help - the static_cast< double > is not calculating the value of term and I cannot see what is wrong. [code] void eConstant::compute() { cout << "Enter the desired level of accuracy to calculate the mathematical constant e, \nmeaning the number of terms in the summation: "; cin >> accuracy; …

Member Avatar for QuantNeeds
0
595
Member Avatar for Aamit

Hi... I want to create windows service for my abc.exe through programaticaly in c or c++ how to do this???

Member Avatar for mitrmkar
0
478
Member Avatar for mewhocorrupts

Hello, I've written a short app that (in theory) connects to a remote box on port 23, and simply reads what is returned. The ultimate goal is to log on to the box automatically in order to automate some of my less interesting tasks. I get the socket set up, …

Member Avatar for mewhocorrupts
0
373
Member Avatar for zoner7

I'm trying to skip part of my loops by using continue; however, I am unsure where how much code each continue statement skips. My suspicion is that, in the below code, the continue statements effectively do nothing and put my code right before the return false statements. I have marked …

Member Avatar for bugmenot
0
1K
Member Avatar for henpecked1

3.6 * vector_a; why can I not implement this binary operator as a member operator of a class Vector? [code] class cycle { cycle(); ~cycle; pedal(); }; class bicycle { bicycle(); ~cycle; pedal(); }; bicycle *bikeptr = new bicycle; cycle cycleptr=dynamic_cast <cycle>bikeptr; cycleptr->pedal(); [/code] Okay, here are the questions I …

Member Avatar for bugmenot
0
141
Member Avatar for zoner7

I've got a pretty simple question. I'm trying to ask the player for to choose a difficulty. I want the case to be to not affect his choice, so I am using the toupper() function. Unfortunately, when I try to return the value of the difficulty, no matter what difficulty …

Member Avatar for Cybulski
0
275
Member Avatar for kartik14

Hi, I want to use a function from a different file in the main method of another file. Both the files are in the same visual studio project. I used the extern "C" keyword in the foreward declaration of this external function in the file containing the main method but …

Member Avatar for vijayan121
0
142

The End.