49,766 Topics

Member Avatar for
Member Avatar for cedwards

Hi Im trying to create a random 2D array (3 x 3) so that numbers 1-9 will randomly be placed in the grid behind the '?' shown in coveredarray but in the guessarray just wanted to know if im doing right, im faily new to C++, also i wanted how …

Member Avatar for vijayan121
0
281
Member Avatar for Rahul47

This simple program of pointer generating THREAT Warning and identified as MALWARE. I dont see HOW ? #include<stdio.h> #include<conio.h> #include<iostream.h> int main() { int num; int *ptr; ptr=&num; cout<<ptr; cout<<ptr++; cout<<ptr; cout<<sizeof(num); getch(); } ![3283bd99afe1c651a274377d4deb3f45](/attachments/large/4/3283bd99afe1c651a274377d4deb3f45.jpg "3283bd99afe1c651a274377d4deb3f45") Thanx.

Member Avatar for Rahul47
0
365
Member Avatar for phorce

Sorry if this is hard to understand what I'm trying to do here, but, I do not know how to approach this. I am using method overloading in my constructors of a class, and I have multiple "Window" functions which are all classes that can be used and I need …

Member Avatar for mike_2000_17
0
294
Member Avatar for cedwards

Hi Im trying to create a random 2D array (3 x 3) so that numbers 1-9 will randomly be placed in the grid behind the '?' shown in coveredarray but in the guessarray just wanted to know if im doing right, im faily new to C++, also i wanted to …

Member Avatar for cedwards
0
198
Member Avatar for max2011

hi. i am marsh a student guys i have a activity but i don't know to start it with a loop. can you help me? ***** ***** **** **** *** *** ** ** * * ** ** *** *** **** **** ***** *****

Member Avatar for Gonbe
0
192
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
218
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
655
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
582
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
213
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
699
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
170
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
182
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
216
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
615
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
601
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
517
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
162
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
168
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
944
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
324
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
366
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
443
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
205
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
90
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
207
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
249

The End.