Beginners - June 2015 (Page 18)

Very simple question with strings
 
So I want to throw out data from a file with certain values, but I have to use a sting to represent the data (most is numerical but not all), but when I try ...
[3 replies] Last: cool. and if you're username is related to the physicist it's spelt "F... (by mutexe)
What is the code for this algorithm ?
 
This is the pseudocode for this algorithm : SQUARE-MATRIX-MULTIPLY-RECURSIVE(A,B) n = A.rows let C be a new n* n matrix if n ==1 c11 = a11 ...
[no replies]
How the *beep* do I make this work?
 
Great. So I have a simple question about making "beeping" sounds in the console. I have tried the Beep() function in the Windows API, but the sound was nonexist...
[4 replies] Last: So is there any other way ... Another Windows specific solution: Yo... (by andywestken)
Recursion and Arrays
 
It's quite interesting what is happening here and I would like to know why. After the recursion is ran 10 times, the *array = x and I have no idea why. I only w...
[7 replies] Last: [quote=Arslan7041]This can't be a coincidence. I just ran the program,... (by Peter87)
Problems with solutions for C++
 
I am reading Lippman's C++ primer, 5th ed. I noticed the book doesn't have problems/exercises, just a few simple exercises here and there. Can anyone recommend...
[4 replies] Last: C++ books with practice exercises: Beginning C++, Ivor Horton Problem ... (by anup30)
Recursion
 
Hello! I am currently trying to understand recursion and I am not quite sure why my code only prints "4"s. I am trying to understand what is going "under the ho...
[3 replies] Last: #include<iostream> int pow(int base, int p) { if (p == 0) return 1;... (by closed account owCjz8AR)
input from ./a.out <filename> command
 
So I am a student and I am just learning how to play with fstream and my instructor wants us to turn in a single .cpp file. the file will be implemented using ...
[1 reply] : ifstream does not have a .c_str() member. You are probably want a ... (by MiiNiPaa)
cmath pow
 
Hi. It's been couple of days since I'm learning c++. Me and my friend challenged each other to write a program which calculates a certain root of a number. I tr...
[1 reply] : It's problematic to compare with floating point numbers. See: 4.00000... (by coder777)
Need help with vector array example
 
Hi, I'm trying to learn C++ and I am currently studying vector arrays. I am confused by which the book is teaching me how to work with vector arrays. In my book...
[1 reply] : Are all three of these values in this vector array 100? Exactly. Read... (by coder777)
HELP WITH MY BACKTRACKING OF SUDOKU
 
I need to use this template.. but he's stop on pos because idk why he's put my bool ENC=true (only 'true' when n==81 and i get solution) in ambient where N=7...
[no replies]
large double values from text file
 
Hey everyone.. I am having an issue with this program that I am working on.. Not sure if I am using something wrong and should try something different.. but gen...
[2 replies] Last: You are awesome thank you so much! (by chalupabatman)
Array of pointers - sort
 
Greetings, This is a three part assignment where we have to modify our code to sort netpay. The code below does sort the netpay properly. However, part thr...
[11 replies] Last: I was working on the next two modules as I am still confused by all of... (by Scythifuge)
by makkz
Inheritance
 
Im making a battleships game, where I need to place ships of different lengths (Aircraft Carrier = length 5, Battleship length = 4, Destroyer length = 3, Submar...
[1 reply] : it's been long time since i did inheritance and little practice i did ... (by koopey)
Operator to tell the type
 
Is there any operator that I can act upon a variable and it will output its type? Thanks.
[3 replies] Last: thanks. (by LayMuon)
by Winsu
Nest try-catchs
 
I want nest some try-cacth loops...I'm not sure how It works, according to the documentatio I have read I can nest as many try-catch as I want..but I dont know ...
[8 replies] Last: And I'm not sure If what I'm saying has logic or not...but according t... (by Winsu)
Rounding Numbers - Ceil & Floor
 
So, hi guys, newbie programmer here, I've been working on a program that produces numbers with large decimals, but I don't want the end result to have any decim...
[3 replies] Last: Integral types cannot store fractional values. Thus, the fraction is d... (by keskiverto)
How does this code find the center element in a vector?
 
The book I'm using tells me this code that makes an iterator point to the center element in a vector. I've been trying to figure out how it works though. int...
[4 replies] Last: @Fr0zen1 Oops - forgot about ctrl-Z But still think it's a poor form... (by andywestken)
by wrymn
Please, give some advice
 
Hi there, I am working on some C++ project (2D OpenGL Game Engine), and I am still learning C++ as I go, I `really don`t know what the best practices are, or ho...
[3 replies] Last: For both. Follow the "Principle of Least Privilege". Give a method o... (by Little Captain)
Coding understandings by comments
 
Hi I have little idea that what is going on.. But I want to make my points strong on each line Following are the code with comments in each line.. Please...
[6 replies] Last: A definition is always a declaration, but not vice versa. definition ... (by andywestken)
Template Question IMPORTANT!!
 
I was reading my book "Professional C++ Third Edition" and they gave the following example to explain function templates. What it is is basically a function tha...
[4 replies] Last: Thank you. (by TheToaster)
June 2015 Pages: 1... 1617181920... 32
  Archived months: [may2015] [jul2015]

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