49,756 Topics

Member Avatar for
Member Avatar for coroshea

I have the following as an Stl algorithm/vector: MyClass <int> VecOfInts("A vector of integers"); VecOfInts.push_back(3) VecOfInts.push_back(2) VecOfInts.push_back(1) I was able to get the numbers to display with a for loop (i < VecOfInts <size; i++). Now my question is: how would I get "A Vector of integers", to display, irregardless …

Member Avatar for vijayan121
0
136
Member Avatar for sonum04

hey sir, i need your help to solve a program? question is= write a program for assesment system of university. the basic idea is to calculate the GPA of each subject and then calculate the GPA of whole semester and the basic of that GPA calculate the grade and remarks? …

Member Avatar for np complete
0
99
Member Avatar for lonelycloud

I've been trying to write a class called Point, with a file Point.cpp including a header file Point.h . I tried to set a global variable of type Point called ORIGIN, however I get an error message saying "error: ‘ORIGIN’ does not name a type" Point.h is as follows: [ICODE] …

Member Avatar for Lizino
0
2K
Member Avatar for christinetom

Hi all Can anyone tell me how I add a linker directory for a specific library to my project in Codeblocks. It would be better if it was there all the time but I think I have to go to Project>Build Options> then I have to select the 'Search Directories' …

Member Avatar for christinetom
0
2K
Member Avatar for mchung90

Hello! I am currently attempting to read all the lines from a text file, and append them to one long string. At the moment, it seems that the line that is read in keeps overriding the string, instead of appending it. I think it has something to do with the …

Member Avatar for nullptr
0
319
Member Avatar for s123456

assuming everything else works...i'm having trouble with the output...the if else statements are driving me crazy. it is outputting the date twice when i enter 7/3/12 code displays todays date....displays "payday" entered......adds 7 days to "payday" to show NEXT payday. void Date::addDays(int month, int day, int year) { _day = …

Member Avatar for MandrewP
0
146
Member Avatar for venkyHyd

**I have tried to display URL(contain unicode characters) response in Message Box. But garbage characters displaying, so that i tried to made different conversions, but alphabits only displaying remaining unicode characters displaying as ?(or)garbage values. im trying this from 3 days..plz help me...plz write the complete code.** HINTERNET hInternet = …

0
41
Member Avatar for sofy

my task is to type 20 integer numbers from 0 to 99 as the input data. few tasks are to check the maximum and minimum, and find the total number of even and odd numbers. (this one i already got the answer). But i have problem for my next task, …

Member Avatar for sofy
0
359
Member Avatar for sofy

not sure if this is the right place to ask, but i need some help for my problem here. i want to find inverse, upper triangular and determinant for a matrix. but i'm not sure why it doesn't work like what i want. for now, i just want try to …

0
112
Member Avatar for francis.deladurantaye

Here is my code. I have a problem with the decimals when it comes to "temp /= 100.0". montant = 61; for (int i=0 ; i<7 ; i++) { if (i != posCreancier) { temp = montant/7.0; (temp == 8.7142857142857135) temp *= 100; (temp == 871.42857142857133) temp += 0.5; (temp …

Member Avatar for Ancient Dragon
0
130
Member Avatar for mitchell5879

Hello, I am having a problem with the output for my sub-string generator program. input: abc desired output: a, b, c, ab, bc, ac, abc current output: abc, abcc, abcb, abcbc, abca, abcac, abcab, abcabc I am sure the error is right in front of me, but I have been …

Member Avatar for zhizu
0
172
Member Avatar for CodyM

/*I'm having trouble creating a constructor for degree and *coeffs as well as properly creating the dynamic arrays for the coefficients of the 2 polynomials a and b. I'm just concerned about getting the correct values. My textbook only gives us eamples of constructos for eamples not well related to …

Member Avatar for CodyM
0
215
Member Avatar for CodyM

So my readPoly fct assigns the values i want to my dynamic array, but when the fct send Polynomial p back to main to be assigned to a and b(fct called twice) the first value of the array is set to 0. I've output the array inside readPoly and it …

Member Avatar for CodyM
0
280
Member Avatar for daniel.moore.5099940

Hey everyone, i need help with this program im doing for a class, now i havent used c++ in a while so thats why im considerably fresh in all this. any at all help would be greatly apprecietated. ALso i can NOT spell to save my life. the problem states …

0
144
Member Avatar for arslan.haroon

Hey! I am stuck on a problem in which i have to print an isosceles triangle (two sides equal) with any character. It would be really helpful if someone could tell me the code, the triangle should look like this: * *** ***** *******

Member Avatar for hariskhank
0
103
Member Avatar for akashi

hi! can anyone solve this string-array problem or give me just an example about it * Write a program that converts a sentence input by the user into pig latin. You can assume that the sentence contains no punctuation. The rules for pig latin are as follows: a) For words …

Member Avatar for Lucaci Andrew
0
909
Member Avatar for sblass92

Hi all, To begin, I'm not certain this is the proper place to start this question, but I believe this to be a linux-linker related error rather than a code based one. I've also searched far and wide for a solution online, but others have solved the problem simply include …

Member Avatar for sblass92
0
266
Member Avatar for rajeshyadav6382

program to read list of words in randomly and displays them in alphabetical order using function and comparison operator.

Member Avatar for Lucaci Andrew
0
43
Member Avatar for k3na26

Hi, I kind of need help with my homework. I already have a code but it doesn't seem to work. I'm confused about the parameters I put. I don't know which part I actually messed up. I don't know what else to do. Thank you so much in advance for …

Member Avatar for satabios
0
3K
Member Avatar for starletcharmed

Hi, can anyone help me with my code? Im trying to reverse my string using stack... but when it compiles and put in a string and press enter... nothing happens... Any suggestions? [CODE]#include <iostream> #include<stack> #include<string> using namespace std; int main() { stack <string> s; string a; cout << "Enter: …

Member Avatar for d_a_y_o
2
4K
Member Avatar for Carc369

How do you do that? This code reads in the book. It reads in fine. Now I just have to alter it so it doesn't read in repeat words in the book. How would I do that? void readInStory(){ ifstream inStream; // declare an input stream for my use int …

Member Avatar for vijayan121
0
688
Member Avatar for Carc369

I've tried cin >> userInput; and it stops reading the word after it hits a space. but then I tried cin.get and it just skips all the other cins. Then I tried cin.getline and it skips over the userInput cin and goes right to the next cin (cin >> direction). …

Member Avatar for vijayan121
0
554
Member Avatar for Elixir42

Hi I am getting some strange results from my framerate calculation. It seems to have a mind of its own. It wants to stay at about 60 fps even if I set it to 80fps. It does run though if I set it to 50fps. I am getting smooth movement …

0
78
Member Avatar for ritchonson101

Hi all...I really need someones help and real fast. I am trying to read a textfile with multiple columns that are each separated by a #. eg: Inventory.txt Nokia Lumia 610#Nokia#Touch#8GB#8#Tango OS#3899.00# Blackberry Curve 9380#Blackberry#Both#1GB#8#Blackberry OS 7#3499.00# Samsung Galaxy S3#Samsung#Touch#32GB#8#Andriod#6999.00# iPhone 4S#Apple#Touch#16GB#8#IOS#7899.00# I am trying to save each bit of …

Member Avatar for mLearning
0
160
Member Avatar for s1994

I'm missing something obvious here I think I'm trying to check for the existence of a file, and I hear this is possible with ifstream's .good property. Not even managing to get that far. Forgive me on this, I'm new to C++ Created a new VS console application. I then …

Member Avatar for mLearning
0
1K
Member Avatar for ahsan2132

iam having my end term oops symester,iam much intresting in doing the project of intercom chat systrm via intranet,iam in in 3rd symester and going to get familier with java with in somedays days,moreever iam much familier with c++,so do you thing i could do this project as being java's …

Member Avatar for KaeLL
0
163
Member Avatar for roland.sikk.1

this error window is all the time on my desktop, closing it it comes back immideately. how can I solve this error problem`? thank You.

Member Avatar for KaeLL
0
64
Member Avatar for chris.causey.37

This code should read in some data from sector zero off of a USB flash drive, then print out some of the data. However when I run it there is nothing that was put in the buffer. int _tmain(int argc, _TCHAR* argv[]) { int ReadSect = 0; char diskname[60]; sprintf_s(diskname, …

Member Avatar for dx9_programmer
0
308
Member Avatar for anjalirwt

I need urgent help in my project as i am getting exception 13 error & that also at such a crucial time when i have to submit the project day after tomorrow...please help and tell the mistakes and their will be some mistakes. the source code is as follows: #include<fstream.h> …

Member Avatar for KaeLL
-1
145
Member Avatar for MianJahanzaibYousaf

* ** *** **** ***** for input=5 How i can print this by using only one for loop with if else statement.

Member Avatar for deceptikon
0
102

The End.