General C++ Programming - September 2012 (Page 21)

Decrement Element and union of set
 
Hello Plz help me. I can't Decrement Element and union of set. assume the set 2 have element{1 , 2, 3, 4} set2 = set2 - 3; output is {1, 3, 4} #ifndef...
[1 reply] : How I can implement union function? Create a new set. Add all the e... (by Peter87)
How to auto save Excel file
 
HI, i am developing a program where i have to auto save the excel file. i try putting some integer data's in excel and auto save the file it works perfect. whil...
[4 replies] Last: //this is my full code #undef _UNICODE #undef UNICODE #include <iostr... (by RIZWAN AHMED)
Varying variable names?
 
Is there any way to make the names of my variables vary according to a separate counter? I want to assign var = 1, and var++ within my program and then assig...
[1 reply] : Yes, it's called array and looks like so: string str ; // definition... (by coder777)
What is wrong with my for loop in trying to store words from a file into an array?
 
Here is my code. All of my functions are fine except for "Function: populateArray" where I have to store the words from a file into an array (the array has a li...
[4 replies] Last: Yeh, I said that too in my reply to a previous thread about this same ... (by soranz)
0.01 does not equal 0.01???
 
I am working on a program to calculate how many of each type of coin you will get back as change, but it seems that the "OR EQUAL TO" part of ">=" doesn't work ...
[2 replies] Last: Thank you for the quick response, that helps a lot. (by zeller000)
help me please
 
I would like covert code c++ to c.. #include<iostream> #include<string> using namespace std; struct node{ string data; node* next; node():next(0){...
[1 reply] : There's no C++ code there except for cin and cout and the use of n... (by AbstractionAnon)
by mika23
stack is not working
 
Hi so my stack program is supposed to allow a user to enter a postfix expression and provide the result or an underflow, overflow error message. Example the use...
[1 reply] : You should probably start with code that compiles. It's not clear whe... (by kbw)
Dog Population Program Assistance Needed
 
-
[1 reply] : use code tags please, it makes things a lot easier to read (by Need4Sleep)
Mean
 
We have a code that calculates the mean of two numbers but we need to modify it so that it calculates the mean of all numbers between it two. Ex. Input 3 and 10...
[9 replies] Last: I agree that the function MeanFromRange will force the users hand in ... (by closed account o1vk4iN6)
Char* to Char array
 
So it is pretty self explanatory but I am trying to put a char* into a char I tried char hold ; char *word=new char ; strcpy(hold,word); and strcpy(...
[3 replies] Last: Null character is '\0'. '\n' is the newline character. (by firedraco)
Need Help printing out results in order
 
How do I meet this requirement: If the users criteria is "Gas", then print the output for the car with the lower gas consumption first. If the criteria is "Tot...
[3 replies] Last: Well what youre prolly going to have to do is set up a nested for loop... (by slider57)
Assigning values to union C++
 
Hello I have a union of this type typedef union UUID { uint8 byte ; /**< Array of 16 bytes. */ uint64 ll ; /**< Array of two 64-bit words. */ ...
[7 replies] Last: Thanks JLBorges that did help. -P (by pranava)
i want to know if my coding is true or not..
 
i have one question.i got a one assesment and i want to know if my coding is true or not.my assesment is want to calculate salary for 3 person.can you help me t...
[2 replies] Last: as peter said.. or you can use char * with getline() to read a whole l... (by sigmablack)
Abstract base class help
 
I have an Abstract base class Abc along with two other classes that im trying to get working, but im having trouble declaring the object. I want to declare Abc ...
[1 reply] : Abc * Obj(4,3); You are initializing a pointer here and it is an ... (by closed account o1vk4iN6)
Recognise a word inside a string (1,2)
 
What do I have to do so that you can enter a whole sentence and that the program recognizes a certain word inside the code? If I, for example, enter the sentenc...
[29 replies] Last: Bare in mind that: 1. Since you're no longer doing it in a loop, it wi... (by chrisname)
Please check my code to count the numbers of neighbours of a cell in an array
 
I have to make a code that checks the number of neighbours of a cell in an array board of cells.
[3 replies] Last: It was error prone, consider using a loop instead. I don't understand... (by ne555)
by macs
problems in fn
 
QUESTION: Write a C program to compute the Sine value of a given number X using the following series. ...
[2 replies] Last: To prevent the usual error when the number of factorials exceeds the a... (by vlad from moscow)
by P12
How do i check if a string is in uppercase ?
 
I'm looking for a way to check if a string is in uppercase. and when there are no lowercase characters it may not write to a file. so what i try reach is: if t...
[7 replies] Last: oke thanks. i'll do (by P12)
by tasnim
pb while opening and reading two txt files consecutively
 
Bonsoir, j'ai un programme qui sert à ouvrir deux fichiers textes et les lire.Il va remplir le contenu du premier fichier dans un vecteur de 2 dimensions, et...
[7 replies] Last: Then that means it could'n open the filepath you specified (we can tal... (by bartoli)
character Occurance and vowel find
 
#include <stdio.h> #include <conio.h> #include <string.h> #include <ctype.h> #include <process.h> char STR ,str ; int x,i=0,num=0,PCO,NOC; void choic...
[no replies]
September 2012 Pages: 1... 1920212223... 32
  Archived months: [aug2012] [oct2012]

This is an archived page. To post a new message, go to the current page.