Beginners - August 2016 (Page 4)

Swapping element recursively
 
I'm trying to swap my elements recursive. For example, my program would scan the array from the left for upper case while scanning the right for lower case then...
[7 replies] Last: I think i misunderstood your words and got threw off by the gentleguy ... (by amoureux)
Swapping elements in the array recursively
 
I'm trying to swap elements in my array with the following conditions 1. Scan the array elements from left to right until a uppercase 2. Scan the array elem...
[1 reply] : For each call to swapElementR(), the program creates i and j as local ... (by EtDecius)
Improvements to my RGBA class
 
Hey guys, here is an RGBA class I made, part of a bigger class interface. Any improvements can you suggest. If it interests you, here is a question I asked abou...
[4 replies] Last: Use (signed) int in the interface. Using unsigned char to limit t... (by JLBorges)
Error with casting from float to int
 
Hi, I just compiled a program containing following function: inline float * align16bytes(float * f) { unsigned int i = reinterpret_cast<unsigned int>(f); i...
[6 replies] Last: ~(uintptr_t)15 would be preferable to the suffix. (by helios)
Trying to understand the purpose of memset
 
I'm looking at Matrix addition samples and in one of them I noticed the use of memset in the Identity matrix function: // Class Matrix4x4 void Matrix4x4::Ide...
[4 replies] Last: Perfect, now I got it, thanks @Necip. It's actually a very convenient... (by hashbrown)
Couting a bullet
 
Hello guys need your help to fix my code or just find what i did wrong , so basically i have a game where is a spaceship and a meteors flying around and u have...
[6 replies] Last: The logic may be simpler, and the progrM more easily extensible if we ... (by JLBorges)
Need help with this mini game
 
Hello guys need your help to fix my code or just find what i did wrong , so basically i have a game where is a spaceship and a meteors flying around and u hav...
[5 replies] Last: up (by yahoo5000)
string reverse recursion
 
My program is written as shown below, but I can't make it return the opposite word even though I think everything is correct. What is the problem? Input word is...
[7 replies] Last: Thanks. (by aurimas13)
astronomical problem | recursion
 
Hi, so the problem is this: In the 18th century, the astronomer Johann Daniel Titius proposed a rule, later recorded by Johann Elert Bode, for calculating the ...
[11 replies] Last: int b( int i ) // invariant: i > 0 { if( i < 2 ) return 1 ; // b... (by JLBorges)
Sum Issue
 
Hello I am working on a roman number to decimal program. My code works a bit for example when I type MIII my output is 1003, but then I type MX I get 10. Any re...
[2 replies] Last: You are a Life Saver! Thank Thank You so Much (by Serge1005)
Help Sought
 
Hello all, I am new to C++ language. I needed an output of 5 random numbers each for X and Y. The conditions for the random numbers are a) the numbers shoul...
[8 replies] Last: Amazing! You were created by a trash can right? It is obvious to ever... (by BHX)
by Bjord
Deploying Code to OS X
 
I am writing a 2D game using C++ in Code::Blocks with Mingw and it is now at a point where I would like to send it to some friends for testing. This is my first...
[7 replies] Last: Several years ago I was able to take a console C program and cut and p... (by SamuelAdams)
Area of polygons (Hint Appreciated)
 
Hello, my name is Trevor and this is my first post! I was wondering if someone could give me a hint on an assignment I was given to calculate the area of regula...
[3 replies] Last: Hi remedys , Just wondering, can you figure out how to use the sam... (by TheIdeasMan)
Overloading the operator ++
 
I'm trying to write a doubly linked list for strings with some overloaded operators. I'm not familiar with templates so my list has two classes. One for the nod...
[3 replies] Last: The members of your node are called p_prev_node and p_next_node, so to... (by Cubbi)
Time Class and time from system
 
Hi I am new to c++ and doing my best to learn... Anyhow one exercise is to write a time class and use the constructor to initialize the object with the curr...
[1 reply] : You might look into the <chrono> header, much of the grunt work has al... (by closed account E0p9LyTq)
Forgetting something about member initializer lists
 
Hi, I have a simple coord class, representing coordinates, and a simple window class, representing a window, here is my code right now. //Coord.h struct Coor...
[2 replies] Last: struct Coord { private: int m_x,m_y; public: ... (by JLBorges)
Hangman Game with functions
 
The assignment in the book I am currently reading was to reconstruct the hangman game using methods. Which I did. However when compiling, I am receiving a Micro...
[6 replies] Last: @AbstractionAnon, @dhayden , @handyandy Thank you for all your help! T... (by newbieGameProgrammer101)
Homework help with split and delimiter
 
So, I posted a bit earlier in the week about this piece. I got the regular errors out of the way I think. But now, I'm having some problems understanding what t...
[1 reply] : Is that the full assignment? There seems to be a lot left out. Where ... (by dhayden)
by Scrivy
Convert string to numbers
 
Ok so I'm just starting to learn c++. I'm 15 and I'm picking it up fairly quickly. What I want to do is to use cin to input a string which can then be changed i...
[no replies]
COUT NOT DECLARED IN THIS SCOPE
 
Hello Fellow Forum Members, I am using Dev-C++. I have written this code, but during compilation it says cout is not declared in this scope, and a...
[5 replies] Last: No I didn't use #include <iostream> One cannot use undeclared ident... (by keskiverto)
August 2016 Pages: 123456... 22
  Archived months: [jul2016] [sep2016]

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