49,760 Topics

Member Avatar for
Member Avatar for AssertNull

Okay, I am trying to learn Windows programming and there are all sorts of new data types that I am running into and need to learn. I'm trying to understand the point of it all and failing. If there is no point and it's just Microsoft making things difficult for …

Member Avatar for rproffitt
0
361
Member Avatar for Cave_1

The example in this post is from** C++ Primer Plus (6th Edition)** by *Stephen Prata* **My question:** Why cin.ignore( ) is not used in his example? Shouldn't we discard the buffer with a line similliar to this: `std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');` Example from the book: int fill_array(double ar[], int limit) { using …

Member Avatar for Cave_1
0
849
Member Avatar for AssertNull

OK, I programmed a few DLLs using Linux years back. My memory (and my memory could be faulty), was that I had the program decide which dll to load based on user input. So I had two dlls, each with a `string encrypt(string, string)`function. The user was asked to specify …

Member Avatar for AssertNull
0
235
Member Avatar for heroares

(create a c program which reads a sequence of daily temperatures for one month, stores them into an array temp and finds the average temperature with a function average.) ı dont know Dev c++ . how i made this? please help me.

Member Avatar for Destaw_1
0
288
Member Avatar for Moeen_2

Hello I'm interested in CPA Certification and need Free and paid web based tutorials,Study Guides .Please reply with accurate instructions and materials.

Member Avatar for rproffitt
0
140
Member Avatar for nitin1

Hi, I have one function (in a library I can't change the code) which takes a key and returns a Object. This code is written in java. I am calling this function from cpp code. I am accepting the result as jobject. 1. Added key as "key1" & value as …

Member Avatar for JamesCherrill
0
2K
Member Avatar for burningkrome

I'm a developer lead and I'm trying to get actual statistics on how many developers are comfortable in multiple C-like languages. I'm specifically interested in the crossover amongst C, C#, C++, and Objective-C. This is a legitimate quesiton, not a spam. Instead of asking everyone to post a comment...I've created …

Member Avatar for rproffitt
0
236
Member Avatar for Kelly_6

2) Write a program that computes the average of all even numbers in the range 3 to 111, inclusive. Use a counting loop. Display the average in a suitable format

Member Avatar for happygeek
-3
178
Member Avatar for sam_21

Write a program in C++ to prepare a frequency distribution table of the percentage marks in Computer studies of sixty students, to be taken as inputs, into the following categories Category Marks(%) Fail 0-34 Pass 35-59 Good 60-79 Very Good 80 and above

Member Avatar for happygeek
-2
418
Member Avatar for Sid_3

#include<iostream> #include<iomanip> #include<string> #include<cctype> #include<stdlib.h> using namespace std; struct Product { string PLU_Code; string Fruit_name; int SalesType; double UnitPrice; double InventoryLevel; }; const int SIZE = 100; int populateInventory(Product *[], int); bool validatePLU(const string &); int main() { /* (Normal way of allocating ) Product *NumArray; NumArray = new Product[SIZE]; …

Member Avatar for ddanbe
0
515
Member Avatar for spiriad

Hi, I am trying to make small game , but I am confronting with a problem. I have a function that should add a new button to my form when it's called. The problem is that I don't know how to create a new object (a button, a shape or …

Member Avatar for Itamir
1
3K
Member Avatar for Nathan_6

Hi, everyone. I want to create a RISK-style game in C++ with decent graphics, of course. I would like to create a map with countries as buttons [I know that this is possible in java through extensions but I want to do this in c++] Could anyone please help me …

Member Avatar for Nathan_6
0
194
Member Avatar for _1_13

We wish to write a program countletter.cpp that takes a filename and a single character on the command line and prints the number of occurrences of that character in the file

Member Avatar for rproffitt
0
96
Member Avatar for Vikram Sehgal

can someone please explain me this piece of code //say getdetail() is a function declared above a.getdetail(); f.write((char *) & a,sizeof(a));

Member Avatar for Vikram Sehgal
0
339
Member Avatar for vishal_13

In this code if we enter the prime numbers like 3,5 or 7 the output is wrong.and if we input 3,11or 17.. output is correct why????

Member Avatar for rubberman
0
55
Member Avatar for _1_5

Hi i'm make an Inventory System for my personal game project with C++ Composite pattern. What I'm going to do is set a limit so player unable add item once hit the specific limit. but here my problem : 1. Did i set the limit & add item function correctly? …

Member Avatar for rubberman
0
363
Member Avatar for priyanka.choudhary.90038

Hi All, I would like to know how to implement reflection is c++ as this feature it is not supported by c++. (1)Base *base_ptr= new derived1(); (2)Base *base_ptr= new derived2(); (3)Base *base_ptr= new derived3(); can those derived object ype can be assigned through vector or string? I.e string list []={"derived1","derived2","derived3"}; …

Member Avatar for rubberman
0
181
Member Avatar for nivedita5

I am working with a code which stores the information of customers in a file called customer_details.txt then asks the user to enter a name and then searches for the name in customer_details.txt, if the name is found, the entire details of the user is displayed on the output screen. …

Member Avatar for 2teez
0
3K
Member Avatar for Zlatan25
Member Avatar for Reverend Jim
-1
115
Member Avatar for meron seyoum

hi,i'm beginner for programming and i don't know how to use pointer in a c++ programming.

Member Avatar for rubberman
0
317
Member Avatar for Nathan_6

Hi everyone. I am makng a RISK game and I am working on a territory class here, and I got a strange message that my google searches have not shed any light on. My code is below. First, my header file: // Class represents each individual territory on the map …

Member Avatar for rubberman
0
531
Member Avatar for Nathan_6

Hi everyone. I am trying to develop a class for a RISK boardgame, and I used UNIT_COLOR and UNIT_TYPE enums to represent the different types of pieces. These enumerations are defined as public in my class but are causing complete havoc in my code because with the C++11 "class enum," …

Member Avatar for AssertNull
0
2K
Member Avatar for chrisschristou

hello friends. i have i simple c/c++ function that return the min of the array to the main function, in the body of the function i'm using an iterative loop so i would like to do it recursivly and i don't know from where to start! all reply are usefull …

Member Avatar for AssertNull
0
542
Member Avatar for Builder_1

//There is a problem in int main when scanning in the constructors into the pointer array ( found around line 843) //(sorts by the value generated in calcStockIndex — a method within the stock class) #include <iostream> #include <fstream> #include<cmath> using namespace std; /* Purpose: To store all information that …

Member Avatar for rubberman
-1
618
Member Avatar for can-mohan

Hi All, In below code when class a object is assigned to class b by returning object through factory method i observed assignment is not happening properly and after assignment still class b's object points to NULL object only. *cobj=rhs;//it gives NULL object However below statement works perfectly when b …

Member Avatar for can-mohan
0
313
Member Avatar for rose_2

I tried to draw that shape but it doesnt work in right way .. any help? example for size = 3 print: * * *** * * #include<iostream> #include<cmath> using namespace std; int main() { int N, t,col,row; cin >> t; for (int i =0; i < t; i++) { …

Member Avatar for rubberman
0
99
Member Avatar for amanueal
Member Avatar for can-mohan

Hi All, After compiling below code , I am getting below error. error: cannot convert a* to b* in assignment. it seems to be assignment doesn't work with pointers . Can anybody throw some light on this? i tried to use unique_ptr by transfering the ownership from a to b …

Member Avatar for can-mohan
0
342
Member Avatar for Sarankulu

We follow debugging with writing debug logs in the file to find any bugs in vc++ and visual studio. Is there any other better way doing the same. Thanking in advance

Member Avatar for tinstaafl
0
61
Member Avatar for Gribouillis

This snippets contains a python program to find a shortest solution to the problem of the farmer who whishes to cross a river. The boat can only contain two things, including the rower. The farmer comes with a wolf, a duck and a bag of corn, and he can't leave …

Member Avatar for Gribouillis
0
2K

The End.