Beginners - February 2015 (Page 22)

Roman to decimal code
 
Hi, so I know there's several forums covering roman numeral conversions out there but I'm in a intro c++ class and I have to write a code that does it with out ...
[2 replies] Last: So far I've only made it to the roman to decimal conversion. I suppos... (by brosephius)
Color components +mask
 
Good day to all, I`m stuck with bitmasking and shifting… Here is some color RGB values stored in a 16-bit value. RRRR RGGG GGGB BBBB Then I could ...
[2 replies] Last: 0x7BEF = 0111101111101111 0XF800 = 1111100000000000 (lightGray & redM... (by pacman169)
iostream error when compiling
 
iostream always fatal error while compiling help #include <conio.h> #include <iostream.h> main(){ int c,i,posisi; int A ={3,2,4,10,20,1,5,8,7,9,6,5,1...
[7 replies] Last: fatal error iostream no such file or directory? It appears you have ... (by tipaye)
Add value in cin question
 
Im new in programming... How to add to variable new value in cin? int num; num=5; cin >> num; If I would enter 2, variable "num" value would...
[1 reply] : int sum = 5 ; int input ; cin >> input ; sum += input ; ... (by cire)
multi-dimensional vectors
 
I have a little text file and I can read it into an array with the code below. I'd like to read them into a multi-dimensional vector (or vector of vectors if yo...
[3 replies] Last: another method, without stringstream #include <iostream> #include <fs... (by anup30)
Can I convert a string to a char?
 
I'm trying to make several functions in a class. The point of the first function is to get a single character, ensure that the user only typed in one character ...
[5 replies] Last: [quote=CNerd2121]The point of the first function is to get a single ch... (by Zhuge)
by dagurr
Calendar Project (easy fix)
 
How do I get this code to work in a way that looks like a calendar. I have tried but it doesnt look right. The first week is always off i need help plz. It disp...
[2 replies] Last: Thanks for your help I spent hours and now I can understand where I we... (by dagurr)
by Torm04
Read number of characters from file excluding spaces
 
Hello, so the question is pretty simple.. How does one read the number of characters in a .txt file excluding the spaces? Here is my code so far. I am getting 6...
[1 reply] : You call your function, but then you ignore its return value and dupli... (by LB)
by kiri
Look over this assignment for errors and help point them out
 
If you could read this and help point out the errors and how to fix em I would appreciate it. I can honestly say I've learned a lot on these forums and continue...
[3 replies] Last: Oh, you edited your post while I was typing mine. A lot of line number... (by LB)
hw question plz help! (challenging)
 
question for coding transivity in c++ a->b b->c then a->c it should contain a main code reading from boolean matrix class for ex)input file is 8 0 1 1...
[no replies]
Need help! (HOMEWORK)
 
Write a program that defines a value returning function named halfIt() that receives an integer parameter. The function should return the number passed to it, d...
[9 replies] Last: Wow...thank you so much. I'll keep you updated! (by daernac)
Class Compile Error
 
I need to write several functions in a class and so far my current function seems to be going OK, but the compiler is having an issue with the class itself. ...
[3 replies] Last: Review the syntax for defining a class. Parenthesis are not involved. (by LB)
wrong use of const type?
 
I recently wrote a code for hw and when my TA graded it he marked me off for wrong use of const type and redefinition along with incorrect use of if, else if. I...
[1 reply] : Although that code works, it works in a horrible way, and I don't know... (by LB)
for loop not working
 
example input from file 111 - 111, 111 222 - 222, 222 so on.. ifstream file("number.txt"); string num1 , num2 , num3 , dash; if (!file.is_ope...
[1 reply] : You wanna do it like this - if (playerFile.is_open()) { } And... (by TarikNeaj)
Multiple file program help
 
Hello! I am trying to write a program that has three files, two .cpp and one .h one of the .cpp files is details the function for the .h and im having trouble ...
[2 replies] Last: Shameless self bump, really stuck on this. Also i believe that for cho... (by YungScrublord)
selected a' random problem
 
please help i dont' know how to add input example= if i select 1 output wil be 43 but in the random chase sorry for my bad english i'm is beginner here ...
[4 replies] Last: i want to make random number and try to call the number with input the... (by Adambacktiar)
by kiri
is this right? visual studio says so....
 
Visual studio corrected it, so... Is it right? I had this and it said to have this.. I had void nme() { cout << " Name:" << setw(3) << name << endl; ...
[3 replies] Last: I don't understand what you mean. Is your problem solved? Is your ques... (by LB)
delete in a doubly linked list
 
but alternates elements , ie , the first element inserted into the left side and the second on the right and then the third element inserted into the right side...
[1 reply] : > delete in a doubly linked list but alternates elements , ie , the fi... (by ne555)
by kiri
Loop until
 
How do I loop this until the negative number is entered and only the negative number bool run_menu = true; while (run_menu) { cout << "Please Enter you...
[1 reply] : int n; while((std::cout << "Please enter a non-negative number: ") &&... (by LB)
C++ Help
 
Good Day All, I am new to programming as a whole so bear with me. Here is my problem I am to complete for school. I have tried different coding and failed mi...
[3 replies] Last: Have you tried the cpp tutorial. What are you using You cannot jus... (by chouhaizi)
February 2015 Pages: 1... 2021222324... 52
  Archived months: [jan2015] [mar2015]

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