Beginners - June 2012 (Page 27)

New to Pointers -- Need help with some Code!
 
Hi everyone, Longtime java programmer here, getting my feet wet in C++ on a summer project. Most of the syntax and stuff is easy to overcome, but I've been str...
[4 replies] Last: I got it working. I don't need to use pcar = &car, or the double poin... (by ajfonty)
Input from a file.
 
I have a file I am trying to read its parts as a struct. the first part being the name of the Item (a string) and the second part being the price (a double). m...
[3 replies] Last: http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-3... (by Moschops)
General Enquiry of a C++ project
 
Hi, im relatively new to c++, doing great so far, and putting the hours in ;) Im building an app which upon login will connect you to certain ip addresses of ...
[3 replies] Last: cheers guys, Moved thread to General. Many thanks (by hushpromo69)
please explain istream in simple terms
 
Can somebody please explain a) what istream is and b) example how it is used? I understand istream is for console input - but why? what does this do that c...
[2 replies] Last: Thanks doug - i have to admit that i was surprised to find that this a... (by closed account ypfz3TCk)
Improve reading data from a file
 
I am working with comma separated value (.csv) files which contain information that is used in later calculations. I have been storing the data in two dimension...
[3 replies] Last: A few changes had to be made in order to use the above code. They chan... (by vckngs7)
Understanding 2D arrays of ints
 
I have a program that requires a 2D array of ints to create a grid to be used for AI pathing. However when I output the grid with the below code excerpt, it cre...
[2 replies] Last: Ah thanks a lot! :) So it was just an off by one error on my part I co... (by Raistlin121)
Linking errors 2028 and 2019 in C++ program
 
Hi, I am a beginner to C++ coding and I have managed to write the following code. I had successfully cleared all my coding and syntax errors. Now, I am stuck u...
[12 replies] Last: You need to add the path to the lib as well (the linker silently ignor... (by coder777)
Resetting vector/array.
 
Hello, In a piece of code I'm working on, I end up resetting a "large-ish" vector. I'm wondering what the best way to do this would be. Looping over index? Ove...
[18 replies] Last: @Gaminic I'm going to guess that your C++ library implements vector.as... (by Cubbi)
by ortymd
Number Factorization
 
Good day everyone. The task is to factorize a long number > 10 digits. Program works OK until I input a >= 12 digit number. What can be the reason? (Not enough...
[5 replies] Last: http://prntscr.com/ambq3 There is your results. (by Volatile Pulse)
Can't get my head around this question.
 
The question deals with Permutated Index sorting. My book (Accelerated c++ by Andrew Koenig & Barbara Moo) explains it as follows: Design and implement a p...
[4 replies] Last: Hi there, Thanks for clearing that up iHutch105, I was typing my post... (by closed account o3hC5Di1)
Infinite Loop problems
 
As part of an effort to teach myself C++ I've been doing a book-length project which was going pretty well until I had to adapt my program to work with files ...
[3 replies] Last: Hi there, Perhaps you've deleted it accidentally pasting your code he... (by closed account o3hC5Di1)
Please explain this code which uses stringstream and stat function.
 
Hello , I am running through a game program code and it says 1.bool keyboardcontroller::loadboard(int boardnumber) 2.{ 3.stringstream sin; 4.sin<<bo...
[1 reply] : Hi there, here's a line for line explanation of the code for you: ... (by closed account o3hC5Di1)
Variable Help
 
a = 5; b = 2; a = a + 1; result = a - b; I understand most of it but is "a = a + l" optional or does it serve a purpose. I couldn't find it anywhere onl...
[4 replies] Last: It's manipulating the value at runtime. This capability is very impor... (by moorecm)
Need help reading C++ files
 
Hello! Im new to the world of C++ language. Obviously. And I am using http://notepad-plus-plus.org/download/v6.1.3.html notepad to write/practice my C++ languag...
[13 replies] Last: Ok I just downloadoed Visual Studio. You said something about GCC. Oh... (by moorecm)
Prime factorization logic
 
Can someone explain to me the logic of this program? #include <cstdlib> #include <iostream> using namespace std; int main() { int n; int i...
[1 reply] : n=n/i; //dont understand this. would n become half if i starts at 2? ... (by ne555)
opengl / rbgImage.h
 
hello, i m new to c++ and dev. and i m trying to write a programthat use opengl (glut) and rbgImage.h. but i m having somme problems, that i can't figure ou...
[2 replies] Last: You can download RgbImage.h and RgbImage.cpp at http://www.math.ucsd.e... (by srikanth chitturi)
Random function from 17 - 20
 
hey guys i wanna ask you something. i wanna make a random function from 17 to 20. but i don't know how to initialized the k value. i just made it this way ...
[4 replies] Last: Make sure that at some point before this happens you've seeded from th... (by MrHutch)
by csoapy
how to print current local time in one line of code?
 
as the title and just only use C++98. and as better as format it! thx!
[4 replies] Last: thank you all! and i known if there no other code u can not output cu... (by csoapy)
Advice on books
 
I'm new at programming. I just started to learn C++ using CodeBlocks. I was wondering what C++ books for beginners you guys would recommend?
[10 replies] Last: I've read all of these books and the ones that are being reccomended a... (by Senjai)
Help with blackjack code
 
Hello, I am writing a code that, when the cards you have, and the dealers up card are inputed in the machine, tells you the best decision to make in a game of...
[12 replies] Last: If you on windows, and you want to pause for a specified amount of ti... (by htirwin)
June 2012 Pages: 1... 2526272829... 51
  Archived months: [may2012] [jul2012]

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