49,761 Topics
| |
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. | |
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. … | |
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 … | |
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. | |
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. | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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); … | |
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 … | |
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 | |
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 … | |
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 | |
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 … | |
[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) … | |
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. | |
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 ... … | |
I have a project in Borland C in which i need to Connect with SQL server 2000 plz give me the code for that. | |
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 … | |
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 … | |
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? | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … |
The End.