49,761 Topics

Member Avatar for
Member Avatar for masa

Hi I would like to know which is better. inialise a value like [code] int i=0; [/code] or like this. [code] int i(0); [/code] and why.

Member Avatar for Dave Sinkula
0
208
Member Avatar for beuls

Dear all, I have written a program in c++ to pass arrays of objects(belonging to the same class) to a member function. It works fine in VC++ but gives an error as "Undefined structure class name". My program is a larger one. So i am giving a similar code below. …

Member Avatar for SpS
0
1K
Member Avatar for DotNetUser

Code in VC++.NET I have a string that has html tags. I want to replace <BR> with \n, but not sure if <BR> will be uppercase, lowercase, or a mixture of both. The string replace function allows only one parameter for the replaced value. Is there a better way of …

Member Avatar for DotNetUser
0
198
Member Avatar for DotNetUser

Anybody know how to create a pop up menu in VC++.NET? In VB 6.0, you would make a call to PopupMenu(menu) with menu visible property = unchecked.

Member Avatar for DotNetUser
0
434
Member Avatar for Jon182

Hey guys, I have been told that the getline function in C++ is a standard library member but is this true as the #include <stdlib> header file does not have to be included in order for getline to work? Thanks.

Member Avatar for Ancient Dragon
0
360
Member Avatar for CPL85

i'm a c++ beginner and now i got a question i try many times but i stil can't solve it so can anyboby here help me to solve? here is my question: Write a program that read in a sequence of characters in terms of sentences. Provide analysis of the …

Member Avatar for CPL85
0
81
Member Avatar for WOTAMod

Don't worry, this isn't a homework assignment :p I've been working on a Half Life 2 modification for a little over a year now. I tried learning C++, I picked up a visual c++ book and it came with a compiler. The book is about 4 inch thick, seems very …

Member Avatar for RedSevenBlue
0
253
Member Avatar for aminura

Can somebody please tell what does this function prototype indicate-- [CODE]const char* fun( char const *,const char*);[/CODE] Is it some thing like that the return type would always be constant char ? And what is the difference in the two declarations-- char const* and const char*? Thanks

Member Avatar for aminura
0
114
Member Avatar for JoBe

Hello ladies and gents, I was just wondering how you would implement this into C if it actually is possible, if not, how do you guys implement an equal way of dealing with this in C ? For instance, if you would have classes like this in C++: [code] class …

Member Avatar for Ancient Dragon
0
138
Member Avatar for coolice

Hi ! I would like ask somebody help. I need to build a very simple application in BCB which can simply record a voice through the microphone. Thats all. It seems to be complicated, but it is fairly simple as it is documented here : [url]http://bdn.borland.com/article/0,1410,28332,00.html[/url] The problem is, that …

0
55
Member Avatar for JoBe

Hello ladies and gents, I hope the moderators won't mind me posting this here, if they do, feel free to move it, but since it is related towards C++, I figured it belonged here ;) A while back I was browsing the GameDev forums and I found this thread in …

0
123
Member Avatar for JoBe

Hello ladies and gents, Wondered if any of you could help me out here, I'm trying to increment an element of a vector of integers. Here's the code: [code] #include <algorithm> #include <cctype> #include <iostream> #include <string> #include <vector> using namespace std; int main() { vector<int> scores; scores.push_back(500); scores.push_back(600); scores.push_back(300); …

Member Avatar for JoBe
0
6K
Member Avatar for VTMas

Here's what I'm trying to do: I have a DSN for an Oracle ODBC Connection. My code needs to attempt to read from a file first the connection string, followed by the SQL commands to be executed. All of this I have down already, except for the Database name in …

Member Avatar for VTMas
0
162
Member Avatar for gmv

hi i am doing a project and i would like to know if anyone can please tell me how to write a delay or wait function in c++ which works asynchronously with other programs. :confused: Thank you for ur help. gmv

Member Avatar for Dave Sinkula
0
235
Member Avatar for kahaj

I'm trying to create a simple text-based word jumble game. Basically, I'm trying to create a bank of jumbled words. Ppl can try to solve the jumble. If it's right, it will cout something about having it right. If it's wrong, it will cout something about sorry, but it should …

Member Avatar for winbatch
0
176
Member Avatar for srishekh

Respected sir/madam, Will anybody help me in how to use ImadeMagic for color image segmentation. I used the command mogrify -segment 100 1.5 image.ppm it gives the output as a gray scale image. Looking forward for the reply with regards shekh

Member Avatar for Narue
0
54
Member Avatar for mariposa104

Hi. I have to create this program in c++ but I have many problems when I try to create can you help me please. Create a class rectangle. The clas has attributes length and width, each of which defaults to 1. It has members function that calculate the perimeter and …

Member Avatar for iamlearning
0
247
Member Avatar for some one

[CODE]#include <vector> #include <string> #include <iostream> #include <windows.h> using namespace::std; class customer{ private: char type; double balance; public: void check_type(){ if(type=='p'){ if (balance<1000) { balance=balance-2;} else if (balance<1000) { balance=balance-5;} } } }; class Transactions{ private: char type; double amount; int houre; int minute; public: Transactions(char t,double a,int h,int m):type(t),amount(a),houre(h),minute(m) …

Member Avatar for iamlearning
0
120
Member Avatar for osean

Hi, can someone point me to a good tutorial on using the CreateThread and CreateRemoteThread API? I've already read the MSDN documentation for both functions, i'm looking for a site that explains the use of both functions in more detail and provides alot of example code, thanks.

Member Avatar for osean
0
562
Member Avatar for Acidburn

Hello, in 'cpp' code if I wish to include a header file its .H...ie //function definitions are located in function.h . The implementation is loaded in functions.cpp, however some of the functions take parameters created in main. Therefore rather than including the following: [quote] #include <iostream> ... function.h function.cpp ... …

Member Avatar for Acidburn
0
134
Member Avatar for rajuwani121

I have a project in Borland C in which i need to Connect with SQL server 2000 plz give me the code for that.

Member Avatar for SpS
0
296
Member Avatar for Acidburn

Hello I'm having a stuggling implmenting some code...here's what I've got so far: [code] cout << "\n\nChoice" << endl; cin >> choice; while (choice!=0) { switch(choice) { case 1: cout << "Inserting manually..." << endl; // addmanual(); break; case 2: cout << "Inserting from file... "<< endl; cout << "file …

Member Avatar for SpS
0
136
Member Avatar for sam1

hi i want to : 1. view all the books 2. search for a book i have managed to complete part of this . the code is as follow: [CODE] #include <iostream> #include <fstream> #include <assert.h> #include <stdlib.h> using namespace std; const int BOOK_MAX = 5000 ; const int USER_MAX …

Member Avatar for dwks
0
211
Member Avatar for Karl1

What is the best way to use Sine waves in C++? Also, I want to, by inputting sine waves, generate a sound and vice versa. Is there a way to do this?

Member Avatar for dwks
0
47
Member Avatar for sunlight

Hi every body I need to constract a code from this problem This question is based on Unit 2. A motor insurance company has surveyed a sample of its clients. The information on each returned questionnaire includes the following: o whether the client has had a claim in the last …

Member Avatar for dwks
0
118
Member Avatar for atrusmre

If I have a MFC program that opens a socket connection, how would I test to see if the socket has succesfully opened or not?

Member Avatar for atrusmre
0
173
Member Avatar for winbatch

If I've got a vector of strings, is there a quick one liner that gets me the longest (ie .size() ) of the string inside (or conversely, the shortest?) The alternatives I've thought of are as follows, but they all seem inefficient: - Keep a variable of the longest size …

Member Avatar for winbatch
0
4K
Member Avatar for Jon182

Hey guys, I have the following code, but for some reason it does not work with bigger txt files is this because of the size of the array? And if so is there a simple way to solve the problem? Thanks in advance for any help. [code] char ch[1000]; int …

Member Avatar for Jon182
0
234
Member Avatar for bops

Hi, I have recently started windows programming in C/C++, I understand most of it, but 1 thing i cant find out how to do is to put controls on the main window of the application, not in a popup dialog box...can anyone give me any tips on how to do …

Member Avatar for Ancient Dragon
0
531
Member Avatar for JoBe

Hello ladies and gents, Ive been reading about Virtual Function in my book and there is this programming that shows how and what happens, I understand what is happening but one thing that came to my mind is that, previously in my book, there was mentioned that you should allways …

Member Avatar for Ancient Dragon
0
782

The End.