49,761 Topics

Member Avatar for
Member Avatar for tundra010

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 …

Member Avatar for tundra010
0
201
Member Avatar for edoscope

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 …

Member Avatar for blackrainbowhun
0
156
Member Avatar for anny**

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 …

Member Avatar for selfrules
0
231
Member Avatar for green_frog

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?

0
52
Member Avatar for Grusky

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 …

Member Avatar for r.evrard
0
166
Member Avatar for sudoku43

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', …

Member Avatar for r.evrard
0
148
Member Avatar for joshalb

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 …

Member Avatar for arkoenig
0
159
Member Avatar for Haranadh

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 …

Member Avatar for tundra010
0
351
Member Avatar for xxjay922xx

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. …

Member Avatar for blackrainbowhun
-2
156
Member Avatar for liompa

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 " …

Member Avatar for mike_2000_17
0
72
Member Avatar for AnkitPasi

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. …

Member Avatar for AnkitPasi
0
710
Member Avatar for Allophyl

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, …

Member Avatar for Allophyl
0
129
Member Avatar for LevyDee

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

Member Avatar for Ancient Dragon
0
64
Member Avatar for Fzn10

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:- …

Member Avatar for sruthivin
0
98
Member Avatar for onako

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) { …

Member Avatar for mike_2000_17
0
4K
Member Avatar for dla0581

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 …

Member Avatar for Kanoisa
-2
98
Member Avatar for priyanka.js28

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??

Member Avatar for arkoenig
0
261
Member Avatar for Jacobah

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 …

Member Avatar for Jacobah
0
64
Member Avatar for Lukezzz

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&amp;clickTAG=http://online.casinotropez.com/promoRedirect?key=em9uZUlkPTM4MzA3MDk2OCZsYW5kaW5nUGFnZUlkPTEzNTEwMTUzJnByb2ZpbGVJZD01MjY5NTE%3D "[/B] This link in this HTML here will play …

0
77
Member Avatar for kirennian

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 …

0
65
Member Avatar for cosmos22

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 …

Member Avatar for nicesiddeeq
0
211
Member Avatar for Dimesh

[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 …

Member Avatar for Narue
0
180
Member Avatar for mrkaran

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.

Member Avatar for mrkaran
0
96
Member Avatar for KadajXII

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 …

Member Avatar for KadajXII
0
103
Member Avatar for anuj_sharma

[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 …

Member Avatar for anuj_sharma
0
99
Member Avatar for j6m8

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 << …

Member Avatar for j6m8
0
67
Member Avatar for ssmg

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 …

Member Avatar for ssmg
1
12K
Member Avatar for ssmg

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 …

Member Avatar for ssmg
0
162
Member Avatar for caribedude

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 …

0
48
Member Avatar for coding101

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++????

Member Avatar for StuXYZ
0
119

The End.