Beginners - March 2013 (Page 68)

srand(); C++ question (1,2)
 
Hi, i am using "srand(1);" and "int random = rand() % 5;" in my code. When i change the value i...
[31 replies] Last: ..well you're my hero anyway :p (by Computer Hermit)
Text file input question
 
I have a text file im supposed to use for input. Each line looks like the following: + 23 34 - ...
[2 replies] Last: that worked. Turns out the loop was doing it for me. Let me try to fin... (by Xilonian)
Composite type
 
I'm reading now ISO/IEC 9899:TC2 draft and confusing about that composite type (6.2.7, in c11 same p...
[5 replies] Last: It's about the compiler coming up with a type when faced with conflict... (by Cubbi)
problem with "bytes.h"
 
hi all i have problem with #include "bytes.h" i cant found this in file MSDN //c:\**\**\de...
[2 replies] Last: thanks you , sir :) (by int man)
Multifile Compilations
 
I made 4 files but everytime I compile persontest.cpp, I get this: /tmp/ccn9tigF.o: In funct...
[2 replies] Last: Thanks! (by UndeadNexus)
trying to create two consectutive #'s where one is either odd and the other even or vice versa
 
SO far what i've done is below and the else statement isn't working. It almost always gives me a 0....
[5 replies] Last: I made the changes suggested by the others and it appears to work for ... (by AbstractionAnon)
A kind of math game
 
there are number 1,2,3....2013 on a blackboard,erase any two number a,b of them and input 2(a+b) in ...
[2 replies] Last: it should be repeated and therefore there are many possible value of t... (by DANNY123)
Help with generic vectors
 
Hi, Does anybody know how I would create a vector with a generic type? Basically, I need an array (...
[9 replies] Last: Wow, it works! Thanks a lot! I haven't learned structs yet though. I w... (by anderfernandes)
Database searching function
 
Hello everybody, The title says it all, I made a simple database that saves the data in a text ...
[2 replies] Last: I recommend learning about basic program control flow and design first... (by ResidentBiscuit)
Totally confusing nested loop that uses blank/char patterns
 
Hey, so yeah, usually I have no problem with this if it was a static set variable. But the variable...
[1 reply] : The hardest part here was to understand the question. If I interpret c... (by Chervil)
looking for simple/basic client server application
 
i have looked at loads of websites but i just can't find code for a simple client server application...
[6 replies] Last: i already looked at these tutorials and they didn't help (by beginner123)
wont read last line from file?
 
So i have an almost complete program but it will not read the last line? what do i need to change fo...
[1 reply] : There's something missing from the code above: [code firstline=40] //... (by Chervil)
Implement all functions in the class
 
I've been trying to implement all the functions in my class, but I keep getting errors. I want to di...
[4 replies] Last: Oh thank you. That did it. (by UndeadNexus)
Object lifetime question
 
Hi, I am wondering, if this is correct, or not, considering the lifetime of the strings in the vecto...
[1 reply] : When you push_back() , you are making a copy of what you pass into ... (by Stewbond)
How do safely add or subtract a number from an iterator?
 
Hi everyone, Suppose I have an iterator and I want to increment the iterator by, say, 5. Without ...
[5 replies] Last: std::distance works out the distance between 2 iterators - you query... (by TheIdeasMan)
by zenniz
Alternative solution to put different int variable into one int array?
 
Any alternative solution to put for example int variable A, B, C, D into int Array instead of decla...
[1 reply] : int Array = {A, B, C, D} (by MiiNiPaa)
Passing arrays
 
So Im quite a novice. I have searched for some of this information but i dont know what im really do...
[5 replies] Last: i would be helpful if you could post your entire code so i can run it ... (by Yanson)
by zenniz
How to split the character in a variable into half?
 
Anyone know how to write a program for the process stated on the title? I'm trying to hard code some...
[6 replies] Last: @SatsumaBenji One again. According to the C++ Standard 9.5 Unions... (by vlad from moscow)
linked list simple
 
Hello everyone I am trying to print the linked list but I keep getting error can someone just point ...
[1 reply] : found out just had to add head = ptr; (by rohanshah1)
unresolved external symbol
 
I am having a hard time calling a method from a superclass. I have two classes, levelBase and levelO...
[2 replies] Last: So, something like this? static sf::Sprite levelBase::getTile(Tile ... (by Wnt2bsleepin)
March 2013 Pages: 1... 6667686970... 87
  Archived months: [feb2013] [apr2013]

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