49,761 Topics
| |
I've got 5 arrays each with one number in them, but in order to sort them using the insertion method, I need to combine them into a single array. How do I do this? This is the last part of my program and can't figure it out! | |
This is the header file provided by my instructor. [code] // // unsortedlist.h // #ifndef UNSORTED_LIST_H #define UNSORTED_LIST_H struct UnsortedListNode // Description of list node { char ch; // Stores one character input from file UnsortedListNode* nextPtr; // Stores address of next node }; class UnsortedList // Linked list implementation … | |
what is the difference between virutual keyword in c++ and final in java | |
hello!! i am a new programmer!! i started with turbo c 4.5. just installed borland Turbo c++. the used same codes as 4.5 but got problem with output screen. i cant see the programs output screen after the program ends!! can anybody tell me how to active it? | |
Hello i am a bit new in C++. i started to take C++ 4 days ago hehe and honestly i love it. now im trying to do is a 3x3 determinant and it is giving me a small problem i tried to find this. 1 2 3 4 5 6 … | |
I'm trying to write a program that will simply move a file from "FILENAME.TXT" to "CURRENTDATE-CURRENTTIME-FILENAME.txt" and am having problems. The error I'm getting is cannot convert from char to char[] Here is my simple code: [code] private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { time_t now; char the_date[12]; the_date[0] = … | |
Hi I'm doing a templated matrix class, and I'd like to be able to pass a function pointer to a function that uses the rows. [CODE=c++] template<typename T> T sum(Array<T> &a){ // a simple function that return the sum of an Array T res=0; for(int i=0;i<a.length();i++) res+=a(i); return res; } … | |
Hi all, I have a class which contains a struct that holds some variables, string, int's. Now, one of the variables (string) in the struct is used to compare it with a name, if the name is in the struct, it has to be [COLOR="Red"]returned from my function [/COLOR]with it's … | |
Write, compile and run a C++ program named that reads in one integer that represents a total number of hours and then displays the equivalent number of weeks, days and hours, all properly labeled. Have your program only do the calculation if the user enters a number less than 30,000 … | |
I have recently begun working on 3d mathematics and I am pretty decent with matrices but I still dont see how having a 4x4 matrix can represent something for 3d graphics programming for a C++ program, could anyone explain this or give an example please. Thanks in advance | |
sorry about my english i make a game and i need to use on interrupt i/o(input), someone can to help me?? the code is : [ICODE] cout<<"Enter num : "; for(i=1; i<=100000000; i++){//its loop time // here the interrupt // when the user click some key its //stop the loop … | |
For the code below I Select an area in a textBox that I will Mark Red. I will also change the Fontsize to [B]16 [/B]and make the selected text [B]Bold[/B] but are not sure what calls that is used for this. [code] this->richTextBox1->Select( 0, 10 ); this->richTextBox1->SelectionColor = Color::Red; [/code] | |
Hi, I am developing a GUI using visual C++ 2005 express edition. I created a window forms (form1.h) with some buttons and codes. Next I added another new window forms (form2.h)with a single button. I wish to link the form2.h to form1.h with a single button click. I searched and … | |
How do you draw on an image in visual studio 2005 and get it to stay? Ive can get it to draw, but it flickers on resize and disappears when the resize is done. Any ideas? | |
I am loading a txt File into a textBox with the code below. For each Line I am checking : if( LoadTopic2.substr(0, 2) == "Ex" ) If that is True I want to select that Row and mark that Line Blue. I have started some code out below but dont … | |
i am required to write a C++ program code that generates random numbers for a dice and it should have 1000 observations please assist a fellow geek | |
HElp.. Friday 09.19 I must present a little program for my C++ university test. I remain just a little bug. I use this code to write my file .DAT [code=C++] ofstream fileScritturaPartita(nomeFile,ios::binary | ios::out | ios::app); fileScritturaPartita.write(reinterpret_cast < const char * >(&sfidaDaSalvare),sizeof(Partita)); [/code] It works very well but in the … | |
Hi, just a query about versions of Microsoft Visual Studio. I last year created my C++ programs using Visual Studio .Net 2003 and have noticed that my new uni course uses 2005. Will I be unable to run my old programs in the 2005 version? Ive had compatibility issues before … | |
Hi!! We are planning to do r project in c++. Is there any good library available for creating GUI in c++? | |
Hello, dear all! Below is heap algorithm. the problem is the output is not appear. How to fix it? [code=cplusplus] #include <stdio.h> #include <iostream> using namespace std; int *Value; int N; void read (int N) { int i; for (i = 0; i< N; i++) { cout << Value[i] << … | |
i require a program that generates random numbers for a dice and should have 1000 observations | |
I followed Ancient Dragon's advice and used vectors to store roughly 1000 objects in a program I have written. Unfortunately, the vector library is not one I am familiar with. I read through the information at [URL="http://www.cppreference.com/cppvector/index.html"]http://www.cppreference.com/cppvector/index.html[/URL]. It seems getting a reference to each element of the vector is the … | |
I'm doing a lab where I must use three sorting methods, then merge sort the three arrays. While separating the larger array, I'm getting a "run time check error #2 stack around the variable x was corrupted: It does this for y and z as well. I think it is … | |
I am studing SE computer engg,i have a problem in above code execution plz some help me | |
hello, dear all, i have a slightly problem with my assigment algorithm as follows: [code=cplusplus] void write( int *x, int n) { if (x != 0) { for (int i = 0; i < n; i++) { printf("%4d", x[i] ); } printf("\n"); } } // print void swap(int *x, int … | |
Can anyone spot the error in my code? The program will enter the last while loop but continue in an infinite loop... I figured fresh eyes may help spot the flaw! [CODE] int xlist[1500], ylist[1500], counter = 0, tempx, tempy, tempcounter; bool assign = false; while(counter < 1500) { xlist[counter] … | |
Hi I wrote that peace of code but it is not doing what is suppose to do. It should saved my numbers into linked lists in incresing order. It doesn't. What am I missing. Thanks [CODE]#include<stdio.h> #include<conio.h> struct Node { int number; struct Node *link; }; typedef struct Node* NodePtr; … | |
I have a program that has a custom class that I would like to create many of and access them like an array. Example: [CODE]#include <iostream> using namespace std; class Thing { public: Thing(int value) { a = value; } int doStuff(int diffValue) { a = diffValue + a; } … | |
I'm doing my own array template version of an array. I'm having some problems overloading a method. I'm doing a specifik version of a "print()" if the type of array is <char>,(i'm saving bools as char). this works without problems. I just needed to add a templete<> infront of my … | |
Hi, Anybody knows how to expose an interface from unmanaged MFC C++ to managed c++ within the same application ? I have a managed c++ class and an unmanaged MFC c++ class, and am trying to create an object of managed class with keeping the application's compile option as unmanaged. |
The End.