Posts
 
Reputation
Joined
Last Seen
Ranked #232
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
96% Quality Score
Upvotes Received
59
Posts with Upvotes
49
Upvoting Members
48
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
23 Commented Posts
4 Endorsements
Ranked #402
Ranked #383
~109.77K People Reached
About Me

I am the lord of the wind.

Favorite Tags
c++ x 247
c x 17
text x 13
dev x 10
Member Avatar for rfrapp

This problem is to print a square using a number that the user enters, which would be in the center. If the user entered a 5, then the program should output this: 111111111 122222221 123333321 123444321 123454321 123444321 123333321 122222221 111111111 If you're wondering, this was not a homework assignment. …

Member Avatar for pty
0
1K
Member Avatar for nitin1

hi, Can anyone suggest me the approach for finding the lcm of the n numbers? my approach: find the max of the n numbers and start dividing it by all numbers , if all are dividing it then print it, else take next multiple of the max number and repaet …

Member Avatar for ShapesInClouds
0
2K
Member Avatar for Riteman

I think this community member will help me to clear my problem. Am not a c++ professional just a beginner. Am on the way to create a software for a browsing center. Am almost struck with the problem of creating multiple text files. To be more clear, Say, a browsing …

Member Avatar for angham kh
0
4K
Member Avatar for Dani

Hey everyone, We haven't done a good contest here on DaniWeb for quite some time, so I'd like to start one up again :) Throughout the months of June and July, I'd like to encourage members to submit fully working code snippets to our library. Throughout the month of August, …

Member Avatar for L7Sqr
3
1K
Member Avatar for Bumpehh

so i decided to try sfml, and i used the sample from the website to see if its working. heres the code //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <SFML/Window.hpp> //////////////////////////////////////////////////////////// /// Entry point of application /// /// \return Application exit code /// //////////////////////////////////////////////////////////// int main() { // Create the main window …

Member Avatar for m4ster_r0shi
0
150
Member Avatar for samohtvii

Hi all, I am having trouble getting a tree to and from a text file. The text file will hold questions and animals. Each node should hold one question and one animal. So if you can imagine: Does it have 4 legs? / \ Does it purr? Does it swim? …

Member Avatar for samohtvii
0
3K
Member Avatar for breezeonhold

I'm getting the exact output I want but I keep getting an error that says "Run-Time Check Failure #2 - Stack around the variable 'c' was corrupted." Now I have to for this assignment use strncpy, and strncat and I'm trying to append two strings togethor with the max amount …

Member Avatar for m4ster_r0shi
0
138
Member Avatar for Jsplinter

I wrote the following code to test which is faster: performing a multiplication and division many times, or accessing the results in a vector via iterators(perform the calculations ahead of time), or hard coding the results of those calculations into the program. I actually expected storing the results in the …

Member Avatar for Jsplinter
0
263
Member Avatar for Despairy

I was thinking about somehow using a static member that all the matrix cells will be defined by their value + the static value. but than i thought how can i do it? what is the easiest way of doing so without the need to run over the 10^6 cells? …

Member Avatar for Despairy
0
294
Member Avatar for soapy.thomas

**Hi there, I'm new to C++ (bet you guys don't hear that very often!!) and what I'm trying to do, in a console application, is this: 1. Ask for a number 2. If the user input isn't a valid float, get angry and go back to 1. 3. If the …

Member Avatar for m4ster_r0shi
0
396
Member Avatar for Bumpehh

This is a very simple Rock Paper scissors game i made. i showed it to my cousin and he played it for like 20 mins lol. Its against an AI and you pick by number, not words.

Member Avatar for m4ster_r0shi
0
1K
Member Avatar for im abcd

So I have coded this program on formula method . #include <iostream> #include <cstdlib> #include <cmath> using namespace std; int main() { int a , b , c ; cout << " Enter the values of a , b , c " << endl; cin >> a ; cin >> …

Member Avatar for im abcd
0
402
Member Avatar for aabbccbryanmark

print "enter a number: "; $in = <>; chomp $in; print &prime($in); print "\n"; sub prime{ for($i=2;$i<($_[0]/2+1);$i++){ if($_[0]%$i ==0){return "not prime\n"} } return "prime\n"; } is this code for c++ language?..

Member Avatar for WaltP
0
295
Member Avatar for <HHH>

i want to read each line of my file in seprated string what i have achieved till now is i can read the whole lines in one string and now i want to read each line in a sprated string any help; #include <cstdlib> #include <iostream> #include <fstream> using namespace …

Member Avatar for m4ster_r0shi
0
127
Member Avatar for sozan.galal

hi everyone, I wonder which is better :to start learning a new programming language or develop my skills in the C++ language ? As I started learning C++ since 7 months :) thanks ina advance for all :)

Member Avatar for m4ster_r0shi
0
163
Member Avatar for userIT

Given a 7x4 array generate four random numbers from the array with no repetition. I can already generate four random numbers the problem is the repetition part. Here's my code so far int f[4]; int s[4]; for( i = 0; i < 4; i++) { // use as index for …

Member Avatar for userIT
0
523
Member Avatar for Bumpehh

Hey guys, im new to C++. been learning for only about a week. The most complex program i can make is a calculator! But, i was wondering, how hard would it be to make a text-based zork-like game? Like i said before im new, so any tips and/or tricks to …

Member Avatar for Bumpehh
0
709
Member Avatar for sillyboy

I usually listen to music while I'm browsing here, what are you listening to right now? EL-P - Fantastic Damage

Member Avatar for Helianthus
0
5K
Member Avatar for triumphost

How can I do the following but easier? I'm templating a class but I want it so that if typename T is of a literal type such as a string or char, then it can use the following member-function. If not then it cannot use it. I've been using typeid …

Member Avatar for Schol-R-LEA
0
826
Member Avatar for schlulol

Hi, I've been working on a c++ game of connect 4. It uses a multidimensional array, and I have a function that is capable of checking if someone has won. However, ai is really bugging me. I've tried to do some research on this minimax thing, but I couldn't find …

Member Avatar for m4ster_r0shi
0
309
Member Avatar for Dudearoo

**Dudearoo** *Useing Code::Blocks* Hey you guys. ive got a problem, ive got a simple while loop being executed that loops 41 lines of code untill the user types no for example int repeat = 2; while (repeat == 2) { // my code // || Example Code // \/ cout …

Member Avatar for rubberman
0
154
Member Avatar for poloblue

Good Afternoon, I'm new to C++ programming and I have to do a program that deals with strings. Below is the code that I have so far, I have problems in this section of the program Get three lines from the keyboards. Play with string copying, concatenation, and input size …

Member Avatar for m4ster_r0shi
-1
137
Member Avatar for Taniya19

I want a fast algorithm to calculate no of permutations for n elements with some elements identical. Using formula : n! / k1! k2!....km! where ki = no of i elements, i = (1,2,...m) and k1 + k2 + ...... + km = n **Without calculating each factorial** as if …

Member Avatar for TrustyTony
0
164
Member Avatar for Albino

I have a problem. 1>------ Build started: Project: SDL Test, Configuration: Debug Win32 ------ 1> playa.cpp 1> main.cpp 1> Generating Code... 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(43): warning C4715: 'load_image' : not all control paths return a value 1>c:\users\will\documents\visual studio 2010\projects\sdl test\sdl test\main.cpp(43): warning C4715: 'load_image' : not all control paths …

Member Avatar for Albino
0
457
Member Avatar for gali01

#include <stdafx.h> #include <stdlib.h> #include <windows.h> #include <GL/glut.h> using namespace std; int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0; int rumus(int x1, int y1, int x2, int y2, int x){ int y=(x*(y2-y1)+x2*y1-x1*y2)/(x2-x1); return y; } void tampilkan() { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClearColor(0,0,0,0); glLoadIdentity(); glBegin(GL_QUADS); glColor3f(0.0,0.0,1.0); glVertex2d(2,2); glVertex2d(5,2); glVertex2d(8+c,11); glVertex2d(7+d,rumus(7,14,2,11,7+d)); glEnd(); glBegin(GL_QUADS); glVertex2d(7+e,rumus(7,14,5,11,7+e)); glVertex2d(9+f,rumus(9,14,2,11,9+f)); glVertex2d(14+g,rumus(14,2,2,14,14+g)); glVertex2d(11+h,rumus(11,2,5,14,11+h)); …

Member Avatar for m4ster_r0shi
0
101
Member Avatar for Dasttann777

Hi again, I am working on a small project which sort of resembles a makeshift programming language, in which if the user types "print" and then a value, the console will write the value, and not the string, for example, if I write *Print "Hello"*, it will output the string …

Member Avatar for m4ster_r0shi
0
158
Member Avatar for OrangeTree

Hi :). I don't found good examples for function sscanf(). Can you help me please with this situation? #include <cstdio> #include <iostream> using namepsace std; int main(int argc, char const *argv[]) { string way = "main/articles/animals/giraffe"; char arr[256]; char arr2[256]; sscanf(way.c_str(), "%[^'/']/", arr); cout << arr << endl; return 0; …

Member Avatar for OrangeTree
0
240
Member Avatar for SandraD

Hello, my name is Sandra. I have been bothering myself for few days with this issue. So I'm trying to create a code that will read from text file named "files.txt" and paste the 2nd line from that text file to somewhere else, like an opened window. void ReadFiles () …

Member Avatar for WaltP
0
109
Member Avatar for Dasttann777

I am writing a program in which you can ask a question, and then if the phrase is jknown to the computer, it will ouput an answer, but I was wondering is there a faster way to the way I am doing it, because at the moment i am just …

Member Avatar for m4ster_r0shi
0
159
Member Avatar for SalicBlu3

Hi guys, I'm not sure how to enter new entries into an array that is full. scanf() allows us to input a number. array[i] allows us to put the number into the array The problem with int array[x] is that you have to define the number of values in the …

Member Avatar for m4ster_r0shi
0
124