Beginners - June 2013 (Page 18)

Storing a fixed set of odd numbers between a given range and adding the sum of what is stored.
 
I am writing a program to store the first 20 odd numbers between 0-100 and provide the sum of all those odd numbers. using two user-defined functions. #i...
[1 reply] : From what I see the logic for what you are trying to accomplish is wro... (by Azagaros)
by drk86
help not counting multiple spaces as words
 
trying to write a program using a while loop to count words chars and lines.......everything works except for multiple spaces. Any help would be much appreciate...
[1 reply] : I will give these suggestions to this. First think about the problem.... (by Azagaros)
Deleting pointers of primitive types
 
Hi all, The following code: Vehicle* toyota = new Vehicle(); toyota->x = 3; cout << "Address of pointer: " << toyota << endl; cout << "Co...
[7 replies] Last: > If you're reusing it, however, then setting it to NULL to indicate t... (by JLBorges)
Slot machine help?
 
I am making a program that emulates a slot machine. I have three functions, each of which represent one of the three reels. Each function vertically displays a ...
[8 replies] Last: Bump (by whatisjeff)
by killua
comparing string vectors to delete similarities
 
IF I want to compare two string vectors and delete the similarities up to at most the second space or first '. How would I go about doing this?
[no replies]
by Elidor
Makefile Question
 
I wasn't sure whether to post this question under unix/linux programming so forgive me if this is the wrong forum section. I made a makefile that has a recipe ...
[3 replies] Last: The problem here is that even when I use the command cd .. it does not... (by Elidor)
Simple Pointer
 
Hello, I have this simple code which compiled and contain no error void add(int x, int y, int* result) { *result = x + y; } int main() { int* ...
[2 replies] Last: Thank you for the explanation naraku9333. (by Longazan)
check the success of memcpy(...)
 
Is there any way to check if the memcpy(..) operation was successful or not ? Regards Sajjadul
[2 replies] Last: memcpy is always successful. The only way it would fail is if there's... (by Disch)
wont read integer input correctly
 
i want it to tell me it is impossible to have more than 744 hours however if i input 744 or anything above it, it is just calculated as a price like the other 2...
[3 replies] Last: I think I fixed your problem #include <iostream> #include <string>... (by closed account D3pGNwbp)
Classes, constructors.. lost
 
Hey! I would like to know what uses this programme can have, because i'm kinda lost with Bucky's now. #include <iostream> #include <cstdlib> #include <stri...
[5 replies] Last: If I recall correctly, Bucky is actually introducing you a little bit ... (by todricos)
by pata
Calling function outside class from constructor
 
I have the following class, I understand I can declare the constructor in the class and define it outside as a solution however I want to put it in the class an...
[2 replies] Last: You rock dude, I didnt know but should have known by common syntax tha... (by pata)
C++ Challenges (not a question)
 
I have been actively looking for "challenges" to {test my,gain new} knowledge in C++ and have found that performing a Google search using the following query wi...
[1 reply] : Thanks for sharing. Works for any other language too, of course. (by closed account 4jNqM4Gy)
Array Conversions in C, or Changing Data Format
 
I've been looking for a few days all over the internet and I just can't get clarity on this at all: The idea: I am given a set of data with a column on the...
[5 replies] Last: Also, suggestions in C preferred even though I'll consider C++, but no... (by closed account 4jNqM4Gy)
by cpcp
Quick Sort dosen't work!
 
do you know why? it's about generic pointers, and I need to sort points by Y: Here is the code: void qs (void *&arr, int left, int right, void (*swap) (vo...
[1 reply] : Why would you write a C++ program this way? C, I could understand.. C... (by cire)
Displaying objects
 
How do you say "Display a .3ds file on the screen?" I don't get displaying objects.
[7 replies] Last: The reason you're not getting an answer is because nobody has time to ... (by cnoeval)
by tdk93
bitwise operators
 
What does this code do and how? unsigned func(unsigned num) { num=num^(num>>16); num=num^(num>>8); num=num^(num>>4); num=num^(num>>2); n...
[1 reply] : Looks like the bit parity calculation. The bit hacks page has a very s... (by Cubbi)
compilers and headers
 
Hello, I am tired of this, I have installed several compilers, pelleC, Code::blocks(MinGW), dev-cpp,and even ms visual studio and a lot more other compile...
[4 replies] Last: now I get it all, thanks for all your replays, now I know how to inser... (by a967Bytes)
unexpected repetition
 
after writing this while loop everything works fine the first time it runs, however when it goes around again it prints the line "you find yourself standing in ...
[4 replies] Last: ok i will try that (by dangerawaits)
Pointers and Class member access
 
OK, this should be a simple one for the experienced programmers among you! I have two classes; move and node. 'move' contains two integer members. 'node'...
[2 replies] Last: Thanks - I knew it was something simple. (by Xtravia9)
by cwn72
std::regex problem
 
How can I get this regex to match the input string? #include <iostream> #include <regex> int main(int argc, char **argv){ std::regex exportRegex (...
[2 replies] Last: Your string begins with a tab and two spaces, which aren't digits and ... (by Cubbi)
June 2013 Pages: 1... 1617181920... 49
  Archived months: [may2013] [jul2013]

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