49,766 Topics
![]() | |
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 … | |
![]() | 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=# cout<<ptr; cout<<ptr++; cout<<ptr; cout<<sizeof(num); getch(); }  Thanx. ![]() |
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 … | |
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 … | |
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? ***** ***** **** **** *** *** ** ** * * ** ** *** *** **** **** ***** ***** | |
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 … | |
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. … | |
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> … | |
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? | |
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 … | |
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 … | |
Which is faster way to use an element pointer rather than an index when scanning arrays? need some clarification why? | |
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 … | |
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': … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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. … | |
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 … | |
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 … | |
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(" … | |
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); … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … |
The End.