49,761 Topics

Member Avatar for
Member Avatar for sireiz

I am facing a logical error in the function filewrite() but i cant figure it out, it all seems right. The sum of the array elements is shown on the screen but when it is written in the file, it is not in the correct format. #include<iostream> #include<cstdlib> #include<fstream> using …

Member Avatar for David W
0
217
Member Avatar for charles.dupree.37

Hi I was wondering if someone could tell me what I am doing wrong. I am trying to call the age function from the person class within the PEmployee class. but the name does not display and the age states 0. thank you for any insight you may give me. …

Member Avatar for David W
0
654
Member Avatar for ddm

1. Write the definitions of the following methods for the class doublyLinkedList a. copyList b. copy constructor c. function to overload the assignment operator d. destructor Also, write a program to test the copy constructor and the assignment operator methods of the class doublyLinkedList. #ifndef H_doublyLinkedList #define H_doublyLinkedList #include <iostream> …

Member Avatar for David W
0
579
Member Avatar for MasterHacker110

I read somewhere that when you develop a kernel in c++, that the new, delete and static_cast keywords require timing references... I was unable to find the site again but my question is, why does these keywords require timing references?

Member Avatar for MasterHacker110
0
212
Member Avatar for triumphost

I want to use it because it says it supports all the C++11 features and I'm hoping that includes Regex as well since gcc isn't near finishing anytime soon.. However, many other websites are saying that clang requires Mingw/gcc to be used in the first place. It doesn't make any …

Member Avatar for triumphost
0
695
Member Avatar for lewashby

In the following program everything works fine when I enter 5 or 8, but if I enter 4 or 7 the program crashes with a Segmentation fault error. I'm just trying to add zeros until the number of characters in string is evenly divisible by 3 and I'm doing so …

Member Avatar for lewashby
0
167
Member Avatar for vishalonne

Which is faster way to use an element pointer rather than an index when scanning arrays? need some clarification why?

Member Avatar for mike_2000_17
0
179
Member Avatar for RascelleGrepo

I am creating a simple area calculator that exhibit overloading. I already finished the overloading function, my concern is, I want to key trap the pressed letters/characters by the user. I want to allow only numbers (int & float data type) input. How will I do that? Thanks. I am …

Member Avatar for deceptikon
0
1K
Member Avatar for pars99

Are you able to have multi-character switch statement cases? So if this is my code: #include <iostream> using namespace std; int main(){ char choice; cout << "Enter a word >" << endl; cin >> choice; switch (choice) { case 'ball': cout << "You entered ball" << endl; break; case 'bike': …

Member Avatar for pars99
1
215
Member Avatar for charles.dupree.37

Hi, I am stuck trying to figure out how to include a class within a class and how to properly call members of a class from the main(). I cannot figure out what these error messages mean. I would greatly appreciate and insight into my dilemma. Thank You, C.D. Enclosed …

Member Avatar for rubberman
0
3K
Member Avatar for Angelrawzz

Hi, I am trying to create a function which takes two chars and a char* string. Then run the function and replace each occurence of Char1 with char 2. E.g. String = Apples. Char 1 = A. Char 2 = B. Char 1 is present in string so replace all …

Member Avatar for deceptikon
0
612
Member Avatar for harde_1

Im trying to add Total function and isMono functions to this code. Did total already Need help with function ismono which returns whether a tree is mono (all the elements are unique aka no element appears more than one time) or not. Please this is the original program #ifndef T_H …

Member Avatar for deceptikon
0
307
Member Avatar for n1csaf3

I am trying to work out how to pass a pointer from my C# interface application to the C++ back-end functionality DLL. I tried searching Google but can't work out what I'm doing wrong.. I'm used to using * for pointers and just changing the value in the pointer through …

Member Avatar for deceptikon
1
598
Member Avatar for Azmah

I'm looking for a really good 3D and/or Game engine to work with? I currently use C++, though I am willing to switch if the it's worthwhile :) Thanks in advance.

Member Avatar for 3dwalkyan
0
512
Member Avatar for NardCake

Hello! I'm very interested in compiler/language design but It's an extremely complicated topic so I've recently tried to wrap my head around and understand one of the beginning and main parts, lexical analyzation. I'm not here to ask for code or anything but I've tried thinking up various methods of …

Member Avatar for NardCake
0
159
Member Avatar for mcnickn

Sorting algorithms are an important part of managing data. There are many sorting algorithms. Each algorithm has particular strengths and weaknesses. You are asked to write two programs in C++, one for Insertion Sort and another for Merge Sort. Compare the execution time for both programs for different data sets. …

Member Avatar for Dewey1040
-3
167
Member Avatar for adil.ghori

Hi everyone, I have created a program with my whole day and night hard work in dev C++ and now im trying the same code in Visual Studio C++ 6.0 ... I'm showing you the code of that program, kindly guide me through this, or correct the problem in getting …

Member Avatar for adil.ghori
0
941
Member Avatar for Alxprog

Hi! I'm a newbie in C++ and encountered myself with a problem: how to transfer data from a text file (containing data in "yyyy.mm.dd" and "09:00" format) into a two dimensional array ? What I want:to convert 2003.12.20 into 20031220 and 10:15 or 09:00 or 00:00 convert into 1015 900 …

Member Avatar for Labdabeta
1
313
Member Avatar for tanatos.daniel

I have this function that should open two files and write their content in a third file, separated by "\n". I don't get why it works for code in comments and not for the one below it, although both provide valid text file names. void concatenate() { /*char *file=new char[strlen(" …

Member Avatar for tanatos.daniel
0
363
Member Avatar for harde_1

Hi, I need a function that will take a tree as argument and return the number of ints that were typed and a correct call. would it just be preorder? like below. Please. Thanks #include "t.h" void preorder(tnode * t){ if (t == NULL) return; cout << t->info <<endl; preorder(t->left); …

Member Avatar for harde_1
0
442
Member Avatar for manel1989

hi every one ! i'm sorry to be so bothering but i really don't know how to solve my problem here: Mathematically, the placement problem of testers into the right nodes) can be modeled by merging the two introduced knapsack variants: multidimensional and multiple knapsack problems. The obtained model is …

0
184
Member Avatar for michaellooks

i installed a codeblocks IDE in my flash drive while i was using windows 7. After downgrading to windows XP, the IDE won't open and an error message pops up "codeblocks.dll is not a windows dll." Pease assist in help me solving this. Thank you.

Member Avatar for michaellooks
0
88
Member Avatar for charles.dupree.37

Hi, I was wondering if someone could look at this person class I am working on. The first part is the class header with the constructors for the class. In the second part I am trying to write the code but when I declare the get_age and get_name objects I …

Member Avatar for charles.dupree.37
0
7K
Member Avatar for Shels

I am writing a program that has two windows. One window draws the shapes you choose in window2 and saves them in a list. When clicking on the second window once the first shape is supposed to move to the spot clicked. If double clicking the second shape and so …

Member Avatar for tinstaafl
0
205
Member Avatar for Jam_1

Hello all: I've been reading up on C++, which seems pretty cool. In my office, the HR representative has to manually calculate an employees vacation & sick time. So I was thinking if it's possible to create a program for her to help her out a bit. This is what …

Member Avatar for Ancient Dragon
0
246
Member Avatar for NardCake

Hello! I've been very interested in the V8 JavaScript engine recently, so I fetched the source and built it successfully, so far so good. I also successfully compiled the [Hello, World!](https://developers.google.com/v8/get_started) program Google provides. I've also read the [embedders](https://developers.google.com/v8/embed) guide. Other than that I can't find any documentation or examples …

Member Avatar for NardCake
0
156
Member Avatar for glenwill101

ive been trying to improve my skills when it comes on to using maps and iterators but i seem to be mostly failing can someone please tell me where im going wrong or point me in the right direction compiler error a.cpp:20:55: error: conversion from ‘std::map<std::basic_string<char>, Object*>::iterator {aka std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, …

Member Avatar for glenwill101
0
413
Member Avatar for nathan.pavlovsky

Hello Programmers! How can I convert a double to a string without losing its precision (i.e. values after the decimal point)? Thanks!

Member Avatar for nathan.pavlovsky
0
2K
Member Avatar for sireiz

I am new to programming and i am now free for 2 months after my exams, i want to learn some basic and very necessary classes or their functions or objects which are used for file folder handling. Kindly suggest some methods which i can learn.

Member Avatar for sireiz
0
263
Member Avatar for vishalonne

Hi all I am trying to remove consecutive blank space by single blank space but getting error by this small line- `ch='';` This is what I have done till now- #include <iostream.h> #include <ctype.h> #include <conio.h> void main() { char ch; int count=0; ifstream in_stream; ofstream out_stream; clrscr(); in_stream.open("A.txt"); out_stream.open("B.txt"); …

Member Avatar for Ancient Dragon
0
185

The End.