49,761 Topics
| |
Hello all As the title suggests, I have tried to write a sorting program in C++ The code compiles right, but does print the sorted numbers, but rather prints a list of zeros. I have tried to find the cause of this error for a while, but I can't seem … | |
Hi, I am having a very hard time understanding what I am doing wrong here. I am trying to read from a file into a struct array, however it stops working properly after a short while. my data in the file is in the following format: Last, First Name ID … | |
me Anny here !! I want help plzz actually m going to make programmable dynamo graph .Its a weight machine with circuit and that circuit is interfaced through port to a computer Now i have to create a program that show a graph between voltage and weight but how is … | |
Hi, I'm working on a game and i have created a new camera but i need to hide an object in the newly created camera and still be able to view it in the default camera. Is this possible? | |
I am trying to create a simple matrix class. When an object of class matrix is created it should be able to create any nxn size matrix. The problem I am finding is that there doesn't seem to be a simple way to make a class with a dynamic 2D … | |
any idea how to create a loop if user input wrong characters..?? i tried to do while loop but it never works.. anyone..?? [CODE]#include <iostream> using namespace std; int main () { double input_x, number; cout << "Insert value: "; cin >> input_x; char choice ; choice = 'D', 'R', … | |
Hello. I'm trying to store a child class into it's a pointer of it's baseClass, like this: [code=cpp]baseClass*test = new subClass;[/code] Which works and all, except I'm having trouble using 'delete' to destroy the newly created subClass. So something like this: [code=cpp]baseClass*test = new subClass; delete baseClass;[/code] Here's a more … | |
Hi I am looking for the code Snipet which can validate the IPv6 address which is given as string format. IPv6 Address string validation, If any one tried code can you share? Mean while i also started writing code if i completed that i will share the same. Thanks a … | |
int i=0; A1: cout << “I is “ << i << endl; i = i + 1; if ( i <= 10) goto A1; cout << “the loop is completed\n”; It is poorly written using goto statements; your job is to convert it into a. while-loop, b. do-while loop, c. … | |
In reference to the code below: why does in one case we get the full string and in the other the address? Can someone please explain this? [CODE] char mary[] = "Mary"; char* aPtr = &mary[0]; int b = 5; int* bPtr = &b; cout << "aPtr value is " … | |
Assignment: 2. Write a menu driven program to execute the given class. A. To search for student by name. If the student does not exist, appropriate message should be given. B. To display the details of the student having greatest average. C. To display the details of all the students. … | |
I have been programming in C++ for a while now, though I have always only written programs with simple command-line interfaces, never a GUI. I have one such program right now which I would like to convert into a Windows application with a full-fledged GUI with customized graphics (for buttons, … | |
How difficult would it be to have a web browser inside a window's application? And what kind of API is available, or is it possible using provided headers with VS. Thanks | |
Hi, i have the following defined on top of the program in C #define Mess1 "\n\rWaterflow Sensor"; in my main i have the following written:- AsUSARTsendBytes(Mess1); The function being called is like that void AsUSARTsendBytes( char *bytes ) Something however is going wrong the compiler is giving the following message:- … | |
After I performed some operations on the vector of structs, I need to free the memory. I suppose clear() will not be sufficient, but I'm not sure how to perform individual delete. [code] typedef std::vector<VertexRAM> VecVertexRAM; // definition of a vector of structs template <typename type> void freeFromMemory(std::vector<type>& myVec) { … | |
1. What numbers will be displayed when code corresponding to the following pseudocode is run? Set N = 3 For (K=N; K <= 5; K++) Write N, “ “, K End For 2. Rewrite the following pseudocode using a For loop instead of the While loop shown as follows: Set … | |
if i want to dereference an object(using delete operator) of DERIVED class which is being referenced using a BASE class reference, which destructor would b called automatically?? BASE class destructor or DERIVED class destructor?? | |
Hi I have a fundamental question, about new projects using wizard • For File/New wizard Win32 projects the applications include the message queue and message loop. • For File/New wizard MFC Application Dialog Based there is no message loop and message Queue How can I add message loop and message … | |
Hi, I have a problem with a Flashcontrol(AxShockwaveFlashObjects). The Flashmovie that I get plays well, this is not the problem. I have to show a HTML code to explain the problem I have. I have received a link that is: [B]"http://online.casinotropez.com/promoLoadDisplay?key=em9uZUlkPTM4MzA3MDk2OCZsYW5kaW5nUGFnZUlkPTEzNTEwMTUzJnByb2ZpbGVJZD01MjY5NTE%3D&clickTAG=http://online.casinotropez.com/promoRedirect?key=em9uZUlkPTM4MzA3MDk2OCZsYW5kaW5nUGFnZUlkPTEzNTEwMTUzJnByb2ZpbGVJZD01MjY5NTE%3D "[/B] This link in this HTML here will play … | |
I'll start by saying that I've solved the problem I had, I'm just trying to gain an understanding of exactly what caused it in the first place. Please note I'm cutting out as much middle-man code as I possibly can for understanding purposes. My program is currently setup so that … | |
Hello, I have recently been able to delete files using this code(With the aid of others from the forum) And I was wondering how you can change this, to suit deleting a folder [code=cpp]#include <iostream> #include <windows.h> int main(int argc, const char * argv[]) { // Get a pointer to … | |
[B]Al salamo Aleekom And Hi..... <= Thank you for reading my topic. ---------------------------------- I read this statements from C++ book but i can't understand it....!! Can anyone help me to understand it In short....[/B] [INDENT][INDENT]The Stack and the Free Store (Heap): .................................... In the section “How Functions Work—A Peek Under … | |
how can i read character by character from a text file using isrteam. i use : istream s; char *next; next=new char; s.open("example.txt"); s.read(next,1); but this gives me each character with some dummy symbol. | |
Hi all, I wish to construct an text editor with linear link list. Now I am writing a function to add a sentence into it and display all. My problem is I can only input a string as it will not take whitespace as input. And I don't understand what … | |
[CODE] #include<iostream> #include<conio.h> #include<string.h> using namespace std; int main() { char ch; do { char str[80]; cout<<"\nEnter The String\n"; gets(str); int len=strlen(str); for(int i=0;i<len;i++) cout<<str[i]; cout<<"\nContinue?\n"; cin>>ch; } while(ch=='y' || ch=='Y'); getch(); return 0; }[/CODE] On executing the above program, the loop asks "Continue?" only once and after that it … | |
I'll admit, I feel like an idiot. It's 3 in the morning and I refuse to go to bed until this is solved. So here's the dealio: [code=c] void doThisIGuess() { int numb = getch(); char numa = char(numb); int num = atoi(&numa); if (num != 0) { cout << … | |
Hello everyone; I'm trying to do something which I'm not sure if it is available in c++. Actually, I'm developing a game with functions.And to reset the game when the user presses a button or a certain event occurs, the program must start running from all over, say from the … | |
Hello everyone, I don't know if I'm confused with itoa,excuse me for this if so, but what I'm trying to do is: I have an array of characters, say [CODE]char example[7][/CODE] I assigned the first 4 characters by [CODE]strcpy(example,"Fill");[/CODE] Then I'm trying to fill the next char with an integer … | |
Hi, does anyone know of a good library for C++ that enables MIDI use? I know there are posts here about some of them, but they are either obsolete or they have virtually no support. If besides the library you guys could point me in the direction of some tutorials … | |
i have a text file on my desktop saved as a .cpp file and has code in it. how do i compile and run it in in terminal using the given g++???? |
The End.