Beginners - August 2014 (Page 8)

Question on Multidimensional Arrays
 
Hello All, I am in my first programming class, so I am a noob at this. I wouldn't say I struggle with the material, but when I reach the limitations of my kn...
[3 replies] Last: I think you're making this too complicated. Since the code in display_... (by dhayden)
To what initilizer or data type, can I set it with value from ctime()?
 
Hello, I am a beginner trying to familiarize with functions related to 'time'. I was looking to modify a time output below so that it will have only one line of...
[1 reply] : http://www.cplusplus.com/reference/ctime/ explains function ctime. Th... (by keskiverto)
Why do we use write function twice ?
 
Why do we need to use read function in while loop when already used once before starting the loop ? And whats the exact use of getting the size of class ? ...
[2 replies] Last: You could just do while (Sfil.read((char*)&Svar, sizeof(student))) { ... (by dhayden)
Program
 
I am making a program to check if a number is a Armstrong number or not. A Armstrong number is a number in which the sum of the cube of the digits is equal to t...
[3 replies] Last: Even if you fix your code, it will only work for up to three digits. ... (by dhayden)
Histogram Algorithm
 
I was wondering if anyone had any suggestions for improvement to a logarithmic scaled histogram algoritm I wrote. It is very simple, but I think that the effici...
[4 replies] Last: Technically, once you fix the power issue, I think the integers will w... (by dhayden)
Class templates and method definition location
 
Hello, I am writing a linked list to practice coding in C++. I am using class templates to make the list universal. In my header file I define the class tem...
[10 replies] Last: But since we're talking about including the implementation at the bot... (by keskiverto)
separate text having different color?
 
How do I put separate color on separate pieces of text? I tried: system ("color 01"); But that just changes the whole thing to color. For example I want: ...
[2 replies] Last: Thanks a lot! But could you maybe give the source code? I'm having tro... (by lpjawesome)
sfml rotate
 
Hi, I would like to learn how to rotate a shape or sprite according to where the mouse is(point towards mouse). I know how to rotate: shape.setRotation(deg...
[11 replies] Last: atan2 will give you the angle, which you can use to set the rotation o... (by Disch)
Loops
 
I am making a prog to display the largest out of three numbers and i am stuck real bad. Pls help :) Thanx in advance. // Just Rahul Prog-9 #include<iostream...
[3 replies] Last: You never assign any value to b, it just has random memory and could b... (by LB)
Termination of loops.
 
I am making a prog to accept a character and display four successive characters. At present i am able to accept and display all the characters after the entered...
[3 replies] Last: int b = a; (by LB)
Struggling with arrays and pointers
 
Hello, I am in an intermediate C++ class that is moving at a fast pace and I am falling behind. I'm in desperate need of some assistance and am having troub...
[3 replies] Last: You're actually pretty close. The main problems are just in generatin... (by dhayden)
by h4ever
error LNK2022: metadata operation failed (8013118D) : Inconsistent layout information in duplicated types (SRC): (0x020001f3).
 
I am trying to fix some module which I have started to do two months ago. class SRC { public: SRC(); std::vector<OPTIONS*> Options; struct RGB { int...
[3 replies] Last: I dont know why this was like that but the original code that worked i... (by h4ever)
Time and Rand Function
 
Is there exists a datatype "time_t"?If yes how/why do use it? Why do we pass time(NULL) in srand function to set the seed value? //Also what does this c...
[1 reply] : http://www.cplusplus.com/reference/ctime/ http://en.cppreference.com/w... (by LB)
Information from user in form of options
 
Can you please tell me how we can ask information from user in form of options, like Press 0 for "statement 1" Press 1 for "statement 2" When user enters e...
[2 replies] Last: Can you please make correction in this program and notify me about err... (by puneet28)
recipe for target 'GameStart.o' failed???
 
So when i run the ccode below that error pops up i have no idea what it means. here's the code: #include <windows.h> #include <iostream> using nam...
[6 replies] Last: well for some reason nothing shows up when i compile and run i mean no... (by Nitrodev)
by h4ever
How to clear object?
 
I have object called Sources, which is member of Singleton S. std::vector<SRC> Sources; When I parse arguments in one method, I declare temporal SRC objec...
[15 replies] Last: Its OK, Ive found it http://blogs.msdn.com/b/saraford/archive/2007/08/... (by h4ever)
Tic-Tac-Toe.
 
Hi, I am trying to code a tic-tac-toe game, yet every time I attempt to change the turn of the character so it pastes 'x' instead of 'o' it always seems to stay...
[2 replies] Last: Ah, and there the problem lies! Thanks. (by JackMorrill)
My program is working, but I'm not sure why?
 
I am able to run my program, using a math function and a limits function. But I havn't included their header files? #include <iostream> int main() { std::c...
[4 replies] Last: Hello, I think most compilers are configured by default to link our p... (by deancorso)
by Ch1156
Help with Virtual function
 
Ok so Im writing a program with SFML that requires more than one window, creating another is as easy as making a virtual function like this: virtual int Run (...
[11 replies] Last: Well I would rather just stick to this right now. Also so in your code... (by Ch1156)
StacksUsingLinkedList
 
hey guys i was trying to make this vector class this works fine but i have a few questions ...if you plz help me ..... i used linked list to make my class....
[2 replies] Last: Thanks bro (by MRKSalman0349)
August 2014 Pages: 1... 678910... 40
  Archived months: [jul2014] [sep2014]

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