49,760 Topics

Member Avatar for
Member Avatar for jrrr

Good Day!!! I have a problem in creating a code using dev cpp. Can you complete my code? This is my code: [code=cplusplus] #include <iostream.h> #include <string.h> void change(); void clue(); void menu(); void compare(); char n1[8]; char n2[8]; char n; main(){ do{ char name[20]; char n; system ("cls"); cout<<"Menu:\n"; …

Member Avatar for stilllearning
0
85
Member Avatar for sunveer

i have to write a program to find sum of the sequence using loops the sequence is [B]x-x^2/2!+x^3/3!-x^4/4!+.....[/B]

Member Avatar for stilllearning
0
86
Member Avatar for guest7

Hi, Is it possible to run another program from within a first program and after running it return back to first program.

Member Avatar for twomers
0
38
Member Avatar for babiker

As you guys might have guessed form the threads name, I have a few questions that am going to post under one thread because i don't want to stuff the front page...thanks in advance. 1. Why are function prototypes mostly declared before the main(), but the actual function is under …

Member Avatar for ArkM
0
96
Member Avatar for swbuko

I've got an array BM[] with a length of 5. How would I declare my function in the heading and what am I doing wrong in my code, it keep giving me errors. Also I dont know how to apply it to my program to do the sorting. Like would …

Member Avatar for stilllearning
0
234
Member Avatar for welles

Dear all, I have a question about inheritance in C++. Suppose there is a base class called "A", with a protected variable "list_" which basically stores a list of objects with type "P", and also there is a method in class A which adds objects to the list. There are …

Member Avatar for stilllearning
0
95
Member Avatar for eehyf

Hello. I have been asked to write a function which Return the minimum index of the nodes with a lexigraphically larger name". But I am confused that what is lexigraphically

Member Avatar for grumpier
0
150
Member Avatar for eehyf

Hello, I faced a problem to use a function in struct format. If I insert the data to the Contact("Ada", "ada@ust.hk", "12345678")). How can I print it out by using the Contact class member "print"? Thank you. [code=cplusplus] typedef struct DLL_node { DLL_node *prev; DLL_node *next; Contact *contact; } DLL_node; …

Member Avatar for eehyf
0
189
Member Avatar for Majestics

I have searched the forum , also over internet but i didn't found any understandable method to convert float number to string , Please help Me in conversion.

Member Avatar for stilllearning
0
2K
Member Avatar for gparadox

[CODE]#include <iostream> //Using for input and output #include <iomanip> //To set each number a determined place in the print function /* This program will try to move a knight around a chess board to each space exactly one time. How I will do that? I will first create the board …

Member Avatar for gparadox
0
170
Member Avatar for wolih

Em.. the problem is quite simple. This is the error output on when I try to build this. [CODE] error: no matching function for call to ‘Console::action_new(const char [5], const char [23], <unresolved overloaded function type>)’ [/CODE] This is the source... [CODE] /* Author: Wolter Hellmund Email: whellmundv@gmail.com --------------------------------------- This …

Member Avatar for wolih
0
137
Member Avatar for cam875

I was just wondering if a C++ compiler is taking the source code and creating a binary file out of it with a .exe extension on it or something or does it translate it to assembly first and than assemble it from there. If it is binary I have always …

Member Avatar for ArkM
0
138
Member Avatar for astropirit

Hi all i have been having this annoying problem. I can change th value of an memory address. the problem is tha the memory address changes every time the application restarts. Now i figured i would need to use a pointer. So i found a pointer that points to this …

Member Avatar for ArkM
0
372
Member Avatar for DaveCachia

Hey all! I am having a problem copying Linked Lists. My Struct has the following fields. list->data list->number list->exit Exit is the tail, data is the head. I tried doing this.. copyList->data = list->data but it resulted in a fail of epic proportions. Can anyone give me a hand please?

Member Avatar for Lerner
0
102
Member Avatar for eehyf

Hello, I am newbie of C++ Below is my code, I want to implement the function "printall " to print out the " contact" data in Dlinked_list. but I faced a problem to call out the function of class "Contact" of "print". for example: list.insert(new Contact("Ada", "ada@ust.hk", "12345678")); then the …

Member Avatar for eehyf
0
123
Member Avatar for skatamatic

As a part of an assignment I am to construct a copy constructor for a bitmap loader/manipulator class. 2 of the things that must be copied are struct headers (containing a bunch of useless bitmap information, with a tiny bit of useful stuff). Image Headerfile: [CODE=cplusplus]#pragma once #include "Drawer.h" #include …

Member Avatar for skatamatic
0
242
Member Avatar for kux

I came accross a strange thing, maybe it's stupid, or I don't have the knowledge of how linking actually works... I have a project that builds in a static lib, and anoter project that builds in an exe and links to the static lib. Compiled with MSVC 2005, all works …

Member Avatar for ArkM
0
106
Member Avatar for grisha83

Hello, I am trying to do this assignment in the book. My objective is to create an interactive program which will calculate areas of a square or a triangle depending on the user input 's' or 't'. I am gone about 40% of the book so they dont expect me …

Member Avatar for Sci@phy
0
101
Member Avatar for lleighob1011

My assignment is rather lengthy and kind of confusing to explain. I have to write a code to sort of create a book store. It needs to create a struct named book and have the user enter the book number, price, and copies sold. There must be at least 5 …

Member Avatar for ithelp
0
126
Member Avatar for opposition

Hey, I am trying to read in a random number of ints from a file into an array of pointers, while also incrementing the size of the array to match the number of new ints... I have come up with this piece of code which somehow works, but doesnt store …

Member Avatar for ithelp
0
79
Member Avatar for Sci@phy

Hi all. I've written my own class Complex, that stores complex numbers. I've overloaded a whole bunch of operators so that you can work with them like with normal numbers. Then i wanted to overload 'new', but I tried it before overloading, and it "seems" to be working. I can …

Member Avatar for kux
0
91
Member Avatar for Prathvi

I am developing an application to Windows Mobile(WM 5). Using CAB am installing the application on the mobile. My problem is that I have to use a different FONT in my application. Can anyone provide me the code to install the font using c++/vc++? What i know regarding this is …

Member Avatar for Prathvi
0
267
Member Avatar for monkey_king

Hi, I've been implementing my own array class, and I've finally started to use it. I do have one question, [CODE=c++] Array<int> ary1(3);ary1(0)=2;ary1(1)=4;ary1(2)=7; //just an array Array<int> ary2(3);ary2(0)=1;ary2(1)=2;ary2(2)=6; //just an array cout << ary1; cout << ary2; Array<int> ary3 = ary1+ary2; cout << ary3; //everything till this point works //is …

Member Avatar for dougy83
0
88
Member Avatar for AutoC

Hi, Lets assume my preorder traversal gives me a unique tree.How do I get the tree from the preorder traversal? Any help is appreciated

Member Avatar for Alex Edwards
0
132
Member Avatar for hervens

Hello I was wandering if anyone knows any good hardware programming tutorials, or books in c++ I'm not a c++ expert, but i feel very comfortable with the language, and read Sam's teach yourself c++ in 24 hours. What i basically want to do, is interresting stuff like, controlling an …

Member Avatar for dougy83
0
344
Member Avatar for bamabambhole01

Hii, C++ is new for me. I have two problem A and B , I need solution of A in B and B in A . I made a pointer in A to copy solution of B but when I am doing same for B to A , it is …

Member Avatar for bamabambhole01
0
93
Member Avatar for asifjavaid

Hi fellows, How can I set a value of any type in VARIANT const pointer? I am tried my best but vain. I am facing compile time error. Here is sample code [CODE]VARIANT *v=NULL; v->bstrVal = "Video.Bin"; another try VARIANT *pValue; //BSTR *fileName; const char* pName; pName = "Video.bin"; pValue …

Member Avatar for asifjavaid
0
2K
Member Avatar for arfte

Hi, all Anyone, please teach me how to create an object of managed class in unmanaged class within the same application (under MFC c++ vs2008) ? (I can turn "/clr" option on only for the managed c++ class, for the whole application it's off due to the compatibility issue.)

0
86
Member Avatar for NinjaLink

I have to write a program that will read a file that lists the scores for two teams. 1st 2nd 3rd 4th Visitors 17 18 21 20 Final Score: 76 Home 21 22 24 16 Final Score: 83 Input file will look like: 17 18 21 20 21 22 24 …

Member Avatar for vmanes
0
1K
Member Avatar for swbuko

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!

Member Avatar for VernonDozier
0
110

The End.