Beginners - December 2013 (Page 35)

trying to output a circle drawn in "X's"
 
trying to create a program to display a circle drawn in "X's". i'm using an array which stores the "X's" at the elements selected by x- and y-coordinates. the ...
[2 replies] Last: sorry - here it is in code tags. thanks, ill try it. (by soapasics)
Reading integers and a string into Array of Structs
 
Hi, I'm having trouble figuring out how to store 4 ints separated by a '.' and a string from a "hosts.txt" file which contains: 111.22.3.44 platte 555.66.7....
[2 replies] Last: Ah! I see. I was trying to use in >> m.a >> m.b >> m.c >> m.d; at fi... (by Valandu)
Info from text to arrays?
 
I have an assignment where I have to xfer information from a .txt file into arrays but when I attempt to do this I get a really bad error message that states "A...
[11 replies] Last: This works beautifully!! Thank you so much guys!!! (by jvjvalerio)
by sd1208
Creating a Structure to hold IP Addresses and other info send via a named pipe
 
Hello, I want to create a structure that I can use to send IP Addresses, Hostnames and Two Other categories to another system to be read. My initial thought i...
[no replies]
Shapes
 
How to make this shape?????? **** ***** ****** ******* ****** ***** ****
[6 replies] Last: No, there isn't, and honestly, in this case probably a brute-force app... (by yulingo)
Please help conio.h problem
 
Hello i´m trying to make a simple snake game (for now) and i´ve run into problems with conio.h in school we use Borland c++ builder and i use MVSE 2013 at hom...
[2 replies] Last: thanks it´s finaly working altho i had to copy paste it from someone ... (by Freakster)
Sorting wont work?
 
so i wrote this code and it SHOULD work but for some reason when it runs it doesn't actually sort the numbers, it just moves them around, but iv looked at it an...
[3 replies] Last: oh wait i see, ok let me try something (by beboman)
by kinley
Efficient counting 1s in a binary sequence
 
Hi, I would like to know how to count the number of 1s in a binary sequence such as 0110111000110 of length N very efficiently. I can use a for loop to i...
[4 replies] Last: Thank you. All the answers are highly appreciated. The Bit Twiddlin... (by kinley)
Help me
 
Help I am getting error and I don't know where. I am new to C++ #include <iostream> using namespace std; { int sample ; int i; int k ...
[11 replies] Last: No worries dude :) (by mutexe)
Matrix and pointers
 
I dont understand why 4 is my answer? int m ={1,2,3,4,5,6,7,8,9}; int (*b) =&m ; int r=**(++b); std::cout << r;
[2 replies] Last: After int (*b) =&m ; , b is pointing at the first row ({1,2,3}) after... (by Cubbi)
by gghf
annoying 'cannot specify explicit initializor for arrays' ERROR
 
Basically this section of the code keeps failing in my VS 2013 compiler. Giving the above error. But when I run it on xcode it works fine. Can anyone please tel...
[1 reply] : Yeah, it is a bug. http://connect.microsoft.com/VisualStudio/feedback/... (by JLBorges)
Plz Help (newbie stuff..)
 
Can anyone please explain to me how does this code work? i mean how did it add up the numbers? isnt numbers+1 always equal to numbers ? how did it move on to th...
[2 replies] Last: Omg, i have been bothering with this program for a whole damn day, tha... (by richielo)
by mkory
Help to figure out problem
 
Hello i am trying to create a program that will count the average for each athlete in the Olympic games. The trick is that i have to remove them maximum score g...
[3 replies] Last: Did you try any of the recommendations I made? I think the main issue ... (by ritstudent)
Splitting file into two separate ones.
 
This is my input.txt Computer 7 Biology 8 Computer 11 Biology 12 I want to split that into 2 different files each file with the same category so that...
[4 replies] Last: Good luck! Keep having fun programming :). (by ritstudent)
Executable stopped working
 
I am new to C++ programming and have a final project due tomorrow (Monday 12/9/13). This code should take a dollar amount entered and convert that into coins. ...
[4 replies] Last: Place an if statement at the end of the function (after the cout state... (by ritstudent)
Simple error.
 
We was asked to create a program using a class called CounterType that counted things. Then we had to create a program using 3 CounterTypes, one for positive Nu...
[2 replies] Last: while(file1) { file1 >> num; if(num > 0) { positive.... (by cire)
by Garion
StrTok
 
I've been reading about parsing lately and messing around with StrTok but it gives me problems when performing simple actions. Like if I did something like (...
[2 replies] Last: Thank you, that "split a string" article is exactly what I was looking... (by Garion)
Quick Sort With Template
 
In this program I am attempting to create the quicksort algorithm using a template so that I can sort both ints and whatever I please. Here is the current code:...
[2 replies] Last: wow such a simple solution, all I needed was to put the template <clas... (by pepstein)
Adding a loop to a calculator program
 
I am having trouble with adding a loop to this calculator program. The prompt says to add a while ( ) loop and also add one more int variable. It needs to be ab...
[1 reply] : This topic has been covered many times. http://www.cplusplus.com/sear... (by booradley60)
default arguments in classes
 
I am not sure why i cannot figure this out. In a simplified script, it runs fine: #include <iostream> class Test{ public: int a; voi...
[2 replies] Last: oh my fault...i was only paying attention to draw_frame and completely... (by metulburr)
December 2013 Pages: 1... 3334353637... 69
  Archived months: [nov2013] [jan2014]

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