49,761 Topics
| |
I am trying to create a program that takes a car year and weight inputted from the user and determines the weight class and registration fee. This is what my code looks like but I am getting an expected primary-expression before 'int' error. Could someone please help me. [code=cplusplus] #include … | |
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"; … | |
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] | |
Hi, Is it possible to run another program from within a first program and after running it return back to first program. | |
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 … | |
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 … | |
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 … | |
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 | |
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; … | |
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. | |
[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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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.) | |
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 … |
The End.