Beginners - March 2015 (Page 38)

by csharp
stack struct function
 
ello I am writing the balance function that should figure out whether the left and right parens (...
[no replies]
Keep getting the wrong answer for matrix determinant
 
I have been writing a matrix class that calculates the determinant of any n x m input matrix using 1...
[no replies]
by Orval
Whats the point of Privates in classes?
 
Ive read the privates section in the book. It only explains how to use the privates. It doesnt reall...
[2 replies] Last: In your code above there are 2 functions. 1 to set the value and the o... (by shadowCODE)
Don't understand data structures...
 
While I was learn in the C++ tutorials here, I didn't understand a snippet of code given in the data...
[1 reply] : movies_t movie is the data type of the argument/parameter. Just like h... (by CS Student)
simple code but still wrong C program
 
#include <stdio.h> int main() {int u,a,b,i;char j; scanf("%d",&u); for (i=0;i<u;i++){ scanf("...
[6 replies] Last: I agree. scanf doesnt always works properly. (by slickvik01)
Switch statement, long distance call
 
Write a program with switch statement that computes the cost of long distance calls.The cost of call...
[1 reply] : if ((start_time >= 8) || (start_time <= 18)) This will always be tr... (by Disch)
Please show me what snip of code is faster.
 
Code A: for (auto it = tiles.begin(); it != tiles.end(); it++) { auto tile = **it; ...
[1 reply] : They're both comparable. I wouldn't worry about figuring out which on... (by Disch)
Functions question
 
Hey all! I am working on my 4th C++ program and am running into a problem. I am getting error LNK201...
[2 replies] Last: Oh goodness! Thank you so much. Overlook on my part. (by still2blue)
Help with file loop
 
Hi im writing a code that opens a file and grabs information. Im having trouble with my forloop in t...
[no replies]
by alexBB
Assigning values to complex numbers
 
I am an occasional C++ user mostly doing gfortran. Now I have to harness an FFT c++ module. So I wri...
[17 replies] Last: OK, I am compiling the code now. Thank you for your help. Alex. P.S. ... (by alexBB)
Program uses a loop to display the characters for the ASCII codes 0 through 127. 16 characters per line.
 
I'm supposed to write a program that program uses a basic loop to display the characters for the ASC...
[1 reply] : Yes. (by fg109)
How do I use .def files?
 
So I'm using VC++2010 and the automatically generated sample code for a DLL project (which I named ...
[no replies]
How to grab separate inputs and count the vowels
 
So, I'm trying to figure out how to take a certain amount of inputs and grabbing those inputs and ch...
[9 replies] Last: Thanks everyone for the help!!!!! (by uchi240)
Celsius to Fahrenheit
 
This is supposed to be a chart that displays degrees Celsius (0-20) along with the conversion in Fah...
[1 reply] : you must put 5.0/9 either the result would be 0 * anything else = 0 , ... (by closed account E3h7X9L8)
by VVS
++ -- expressions
 
int x = 5; for (int j = 0; j < 10; j++) { x++; } cout << x << endl; a. 5 b. 9 c. 15 d. 1...
[2 replies] Last: the for statement will increment x by 1 (x++) till j which is initial... (by closed account E3h7X9L8)
iterator problem with vectors
 
so I want to write every element in the vector till it reaches an empty element(which is 0) using it...
[2 replies] Last: oh so that was the catch thank you :) (by closed account E3h7X9L8)
need help shape
 
if user enetr 4 the output will be ----1 ---2 2 --3 3 3 - 4 4 4 4
[1 reply] : enjoy :) #include <iostream> using namespace std; int main() { in... (by closed account E3h7X9L8)
Please explain simple while loop formatting error.
 
Someone please tell me why the loop here doesn't read the .txt file properly, but when I manually ty...
[2 replies] Last: Thanks so much. That fixed it. I'm new to c++ so forgive my ignoranc... (by wytmust84)
Boolean function error
 
But the problem is that this function is good if I know the number of elements in the array, otherwi...
[4 replies] Last: dhayden Thank you very much you are such a great guy. And thanks to t... (by sysmassjo)
by mqazi
Casting Pointers
 
When casting a double into integer pointer, which 4 bytes will be assigned to the pointer ? first or...
[1 reply] : The first, meaning that p will point to the byte of x with the lowest ... (by dhayden)
March 2015 Pages: 1... 3637383940... 51
  Archived months: [feb2015] [apr2015]

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