Beginners - December 2013 (Page 62)

Need help with a program
 
So a question that came in my exam was "Write a program to list the prime numbers from m to n" I tried making the program right now but I manage to input the va...
[8 replies] Last: #include <iostream> #include <conio.h> using namespace std; int mai... (by RabMac)
Multi-Dimension table.
 
Hello. I write a code with 4 column and 5 row. The 10 row print correct but i don't know how to print the column. Here's the code and the output of my codes. ...
[9 replies] Last: You do call getche() in the outer loop. What does that function do? ... (by keskiverto)
BubbleSort Problem
 
Call to undefined bubbleSort. why this happend? class hotel { //========================== customer variable declarations ============== int room_no; c...
[2 replies] Last: i already define bublesort as a method of hotel. but still... it doesn... (by orangebanana)
by olleh
Airplane Ticket .
 
Here's my code
[1 reply] : the symbol for free is '*' and for taken 'X'. So think of a third symb... (by coder777)
Would there be a efficiency loss to use "n--"
 
If I use ordinary method, would it be running faster if repeat a lot of times. while(n-->0) p =c; while(n>0){ n=n-1; p =c; } ...
[7 replies] Last: though a bit ambitious to me for now, thanks a lot! (by q1670741824)
why normal function can make a type cast while template function can't?
 
If I give two parameters the called function require but not that type, the compiler can make a type cast like below. //function call hello(1, 1.0); //functi...
[4 replies] Last: thanks a lot, now i see that :) (by q1670741824)
Constructor parameters using new with a non-pointer
 
Hi there! I've made the following code (just for fun): main.cpp /* Project name: java2cpp Author: Lucas Henrique Date (start): 30/11/2013 */ //In...
[8 replies] Last: You are using an older version of the compiler; one that does not supp... (by JLBorges)
What does an asterisk(*) do?
 
Kind of a noob at programming, but what does it do exactly, same thing with MAX_PATH and &. Also, I have never really found a good use for char, mostly because ...
[5 replies] Last: I think you want to read this: http://www.cplusplus.com/doc/tutorial/p... (by aleonard)
Creating a grid with for loops and 2D array
 
Hello, I know this might have been asked before, but I cannot find an example that could correctly guide me to where I'm trying to get. So my problem is as foll...
[1 reply] : You have: for (int r = 0; r < 4; r++) { for (int c = 0; c < 4; c+... (by keskiverto)
Program doesnt run. Need help with constructors!
 
Not sure why my code doesn't run. In main, student a is supposed to call the default constructor, student b should call the constructor with 1 parameter and pas...
[8 replies] Last: I suggest you read about linkers. (by mutexe)
Can't find the error
 
I'm writing this code just for fun, and to better understand what I'm learning. But when I build this code, 4 errors keep coming, but I don't know what they me...
[9 replies] Last: computergeek, no offence but your advice is not correct again. It has ... (by mutexe)
by hychan
String processing
 
I'm trying to practice for my coding quiz when I face with this problem. I have no idea how to code this so can somebody please help me out? Details below. ...
[3 replies] Last: The first 15 characters is stored as the names. For Mary, 15-4=11 For ... (by hychan)
by tavuk
Question about loops/my code efficiency
 
Task: Ten cannibals begin to eat thirty missionaries. It takes an hour to consume the first missionary. At the end of each hour, if an entire missionary ha...
[1 reply] : Changed my titled and organized my post. (by tavuk)
help with arrays
 
HI i would like some help with arrays; I need to store information somehow and my first though was using arrays to store information, but I am fairly new to thi...
[2 replies] Last: I did a 2D table now, I am just trying to figure out one last problem,... (by jonnhynick)
help with a function meant to create a 2D array
 
Hello all! This is what I'm trying to do. Within a function constructMappingArray, I'm trying to create a 2D array 26 character column by n amount of input row...
[no replies]
Cin operator error! WHY?
 
Totally lost! I'm getting an error on the cin operator, and can't be able to define why. I'm getting this as the rror message while trying to match the argume...
[7 replies] Last: in case it's not clear : string foo[ ] is different from char foo ... (by nvrmnd)
do/while loop
 
Hi! I am trying to have my program repeat with a do/while loop but when i put in the do/while i keep getting errors on it. This is a header file too and it wor...
[2 replies] Last: oh okay (by Lindseybb)
Function Declaration
 
I'm getting invalid function declaration for compute. It needs to accept two arguments. //tip.h header file class tipCalc { private: ...
[1 reply] : at line 15, you are missing a colon ( : ) (by nvrmnd)
Finding white space, new lines and dashes
 
I am struggling with getting my function to find either a space, new line, or dash ( - ) in my string. I was able to write it to find a space with no problem, b...
[1 reply] : I figured it out! To find one of two (or several) different characters... (by lunafly)
c++ program that converts mips to hexadecimal
 
I'm suppose to write a c++ program, that converts mips assembly language into hexadecimal. I know the method but i have no idea what so every on how to start on...
[no replies]
December 2013 Pages: 1... 6061626364... 69
  Archived months: [nov2013] [jan2014]

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