49,761 Topics
| |
I have created a new windows form application and made a form using the editor in visual studio. This is the code that was generated in form1.h: [CODE]#pragma once namespace DatabaseForm { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; … | |
hi ppl, i' ve done a program that calculates the result of raising a random base to a random exponent. the problem is that this stays in a loop that never comes out, n i have to abort it. and, its ok to put `exp*=exp??` cuz, i dont know how … | |
Dear All, Kindly tell me in brief that " impct of OO paradigm on software development (programming)" | |
hello all i want to know the uses of function returning by refrence and how to use them i tried this but it gave an Error [code] int& sumz(int x,int y) { int *sum = new int; *sum = x + y; return sum; }[/code] | |
Hello friends, Suppose I have a .doc file (MSWord). Now, how can I read that file using C++ console application, ie, not using MFC or any other visual components. Thanks, Amit | |
Hi I have made a program that will change the settings of printer orientation. But I am getting linker error. " [Linker error] undefined reference to `OpenPrinterA@12' " I am not able to find out the reason. Kindly advice Regards Karan Gupta | |
I have a recursive function squares that receives a positive integer n and prints out the first n perfect squares in descending order. Can anyone tell me if this is correct and if not please help. [ICODE]squares(int n) { if( n== 1 ) return 1; else return squares ) n … | |
BinarySearch is called on the array below, searching for Value 20. Is the final value of Index 20 in [6]. I think this is right. 2 5 10 15 20 20 20 20 [1] [2] [3] [4] [5] [6] [7] [8] | |
Hi, Is there any way to store huge numbers (for example, a number with a million digits) in a C program and be able to perform operations on it ? Thanks.. | |
Hi, everyone! I thought I posted the code first, it's better. This is the code of the program I've worked with : [CODE] #include "liveMedia.hh" #include "BasicUsageEnvironment.hh" #include <stdio.h> UsageEnvironment* env; Boolean reuseFirstSource = False; Boolean iFramesOnly = False; static void announceStream(RTSPServer* rtspServer, ServerMediaSession* sms, char const* streamName, char* inputFileName); … | |
How can I achieve in c++, like Foo foo = new Foo.SubFoo(); or Foo foo = new Foo().SubFoo(); Where, Foo : class SubFoo: maybe sub class or independent class, but not method. Note: i Don’t want to use "namespace" | |
Hi Quick questions abour overload constructors. Lets say I have two overload constructors: [code=c++] class MyFileExtractor{ MyfileExtractor(string); MyfileExtractor(string, int); ~MyfileExtractor(); private: string name; int columns; } /*Class implementation*/ MyFileExtractor::MyFileExtractor(string fname,int c):columns(c) { name=fname; } MyFileExtractor::MyFileExtractor(string fname) { #define STD_NUMBER_OF_COLMS 1 //standard number of columns MyFileExtractor::MyFileExtractor(fname, STD_NUMBER_OF_COLMS); } MyFileExtractor::~MyFileExtractor() { cout … | |
I have started out with tasks that need to communicate between different forms. I need to understand the logic how this works and have problems to find any examples of this. For the 2 codeexamples below, I use these to close the current Form or activate another button on the … | |
Hello, I am having a small problem because I have to have to have it so the user can enter a number and that number is stored in a variable and that variable becomes the name of the file to be created with the extension .asw. It is going to … | |
I have a 2D vector that I have a count on the first dimension and push_back for the second dimension. The vector i have declared like this: [code] std::vector<std::vector<string> > TwoD(1000, std::vector<string>()); [/code] For example say that I have counted the first dimension to 3 and push_backed the second dimension. … | |
hello, i want to learn if there's memory leak problem in my code...Let me explain: I have a Customer class,that class also have a destructor function. I have a static function in that class which returns n Customer objects. [CODE] static Customer* createCustomers(int n){ //... } [/CODE] [CODE] int main(int … | |
my 2nd prog, i intend on adding to it next so that it manipulates the data, see what cool things i can make it do....anyways, just looking for some feedback again on my prog, does it suck :) ? Thx in advance [CODE]#include <iostream> #include <fstream> #include <vector> using namespace … | |
My professor has assigned a lab that we will later be using to learn how to abuse the various types of data structures. In this first lab he asks for the default constructor, a copy constructor, and an overloaded constructor to accept the appropriate data, which you'll see in a … | |
I'm having trouble with an inheritance hierarchy program. I have widdled this program down from a lot of errors to just 1 error. However, I can't seem to figure out how to correct it. Here is the error message I'm receiving: [code]error C2679: binary '<<' : no operator found which … | |
I know that to make a simple yes or no question I can do this: [code] int Answer; cin >> Answer; if (Answer == 1) { Response } else { Response } [/code] But in the accounting program (In a recent thread), it registered the key before you hit enter. … | |
Hi, I have been making a program that encrypts files. It works, but it compresses them. It only does it a little bit, but it does. It's weird. Why is it doing this? I have attached a zipped folder with the code, binary, an encrypted file, and the original file. … | |
hi every one Im still new to programming i have downloaded borland compiler and was writing the following code: [code]#include<iostream> using namespace std; int main() { for (int x = 0; x < 10000000000; x++ ){ cout<< x << endl; }cin.get(); }[/code] the problem is that when it is done … | |
I am writing an interpreter and have come that far that I need to identify or-stataments( || ). Just for fundamental analysis. The code is not a problem. Only the thinking here. My problem is that I am not quite sure how I have to think. I know how it … | |
Hey! how is everybody! I need help on my little home project. how do i write a for with no limit of iteration? i need it to stop when a value into the for is reached not when i<=n. | |
I am trying to finish it but there is a problem. The overloaded operator>> doesn’t work in class Circle. Would you please explain to me what wrong thing I did? Thank you so much. [code=C++] #include <iostream> using std::cout; using std::cin; using std::endl; using std::istream; using std::ostream; #include <iomanip> using … | |
Hi I am having great trouble with making my bitmap fit properly on a 1024x768 full screen window. The length is correct but the vertical is too long. I have searched the net and it has said that the size goes up in squares eg 2, 4, 8, 16, 32, … | |
i am having a problem in my function, i need someone to explain or fix my problem. and r my arrays correct. [code] #include<iostream> #include<iomanip> using namespace std; void display_draw(int mega[12][6], int draw_index); int main() { //int i; const int NUMROWS=12; const int NUMCOLS=6; int draw_index; int val[NUMROWS][NUMCOLS]={ 5,14,16,39,51,34, 1,20,22,29,41,35, … | |
Well. I 'm trying to get a program in C++(MS-DOS) to open another .exe file. I thought there might have been a way with the: [CODE]system ("main.exe") ;[/CODE] to call it, but somehow it does not work and its like it skips it completely. I'd appreciate any help. Thankyou. (Sorry … | |
In the code below i can'f figure out how to get the numbers from my inFile that will be reversed then put into my outFile. I left part of the code unfinished. not sure what I am supposed to put in between >> >>. pretty lost on this one. Im … | |
Hi everyone! I have a program written in C++ which already exports some data to Excel, on the other hand, I have another program written in VBA to analyse the data. I used to run them independent but now I would like to simplify them. Is there a chance to … |
The End.