Beginners - July 2013 (Page 7)

namespace or class
 
If you were to put a bunch of unrelated functions meshed together, would you put them in a namepsace or a class. I currently have this setup in a class, but it ...
[1 reply] : If they were unrelated I wouldn't put them in either :P But to answer ... (by fafner)
char to string
 
How can I convert a char to string ? Thank you!
[5 replies] Last: Thank you! (by closed account jwkNwA7f)
Sending packages (UDP), how to split them?
 
Okay so i know how to send packages. But i also now the limit (64kb), which means. Anything more will be impossible to send in one package. So my problem is...
[7 replies] Last: I have read but i don´t understand at all how to send in TCP. From wh... (by zerowalker)
sstream knowledge
 
Can anyone explain me whta does line 23 do?? // example about structures #include <iostream> #include <string> #include <sstream> using namespace st...
[9 replies] Last: thanks (by Albo Coder)
Array question
 
string myArray = {"word", "another"}; string anotherArray ; anotherArray = myArray ; How can I get a certain letter of "word" that is in anot...
[2 replies] Last: Okay, Thank you! (by closed account jwkNwA7f)
fscanf() skips the first line in text file [C]
 
I have a text file that contains simple account information like this: 1234567890 234567 345678.90 First line is a 10-digit account number. Second line is the...
[9 replies] Last: do you mind explaining what this line means? "%10s%9s%f" That line... (by Cubbi)
sleep function
 
I get a fast loop, so its not sleeping for 1 second on each iteration. What am i missing? #include <iostream> #include <string> #ifdef WIN32 #include <w...
[2 replies] Last: oh, haha, i thought it already converted it to milliseconds with the 1... (by metulburr)
by Codeez
getline in a class
 
Hi folks, I'm only just getting into classes. I wrote a simple one to get employee imformation. When I got to read in the name string it just skips right past i...
[5 replies] Last: really whenever your about to deal with strings. i dont think it will ... (by closed account Dy7SLyTq)
This the right way to check input?
 
I want to know if I catch invalid inputs correctly. On line 18 is how I test if non-integers are entered. I need to know if it's the correct way of doing that. ...
[4 replies] Last: Okay thank you all, I think I am now starting to get how it all works. (by vasilenko93)
String problem
 
When I display the string it displays something weird. carry = worde ; worde.erase(0,1); worde += carry; worde += "ay"; cout << word; --- 00FD64C4 ...
[7 replies] Last: Just fixed it again, sorry I put you to the trouble. Thank you! (by closed account jwkNwA7f)
irrklang audio libary help!
 
What is the correct way to setup irrklang in Code::Blocks on a windows 7 laptop?
[1 reply] : Anyone? (by Johnny111111111)
More Assembly Line Programming
 
I could use a hint towards what is the accurate interpretation of the following assembly code to C. //x at %ebp+8, n at %ebp+12 movl      8(%eb...
[1 reply] : Anytime you see a conditional jump back to a label in the code, you ca... (by AbstractionAnon)
by piczim
" C program " Adding Questions and using Answeres in Calculations
 
I am trying to do a BMI calculator. My code below asks for weight and height below and then returns the BMI result with the definition of your weight status....
[2 replies] Last: My question is My code asks for weight and height below and then re... (by piczim)
by haterz
radian convert to sine, cos, tan..
 
i've written 1 program until this.. but im stucked at convert to sin, cos and tan parts.. can anyone help me to solve this problem ? i have to combine both of t...
[no replies]
problems pointing to an array
 
So I'm trying to call the balance of an account in my program with balance = accounts_ .GetBalance(0; Now if I substitute i with 0 which is the actual positio...
[1 reply] : it wasn't working earlier but balance = accounts_ .GetBalance() seems ... (by philbertfour)
Showing the Highest and Lowest Integers in an Array
 
Hello everyone Some prior information: I am a novice coding in Windows 7 using Visual C++ 2010 Express. I have spent a good long while searching for solutio...
[3 replies] Last: You are not changing maxval or minval in your loop. Instead you are c... (by BlueGreen)
Beginner game ideas (1,2)
 
I have read a lot of Michael Dawson's Beginning C++ Through Game Programming 3rd edition, and I have made a few games. I have now ran out of ideas :( Can an...
[32 replies] Last: Nevermind, I fixed it. I didn't need the on them. (by closed account jwkNwA7f)
Create object and call function in Main
 
Homework assistance only,I need to create an object from this class (StudentRecord) Call an input function of this object (not class) Call an output function of...
[9 replies] Last: As has been pointed out several times, you're missing the closing brac... (by AbstractionAnon)
void Functions to standard output stream
 
Just a small question! Been challenged with creating a function that writes to the standard output stream (cout). If my function is of type 'void' and as ...
[2 replies] Last: Cheers! (by igotabuginmyeye)
by qriz75
writing to and reading from file gives -9.25596e+061
 
First of all: Thanks for taking time to help! I have 2 programs that are accessing one text file. The first one is supposed to take in the quarterly sales f...
[1 reply] : I found it myself ;-) line 22 of the second program had an ; to much ... (by qriz75)
July 2013 Pages: 1... 56789... 53
  Archived months: [jun2013] [aug2013]

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