Beginners - January 2013 (Page 4)

by john22
print statement question
 
Hey all, if you have an array of char p = "/file/a/" how would you print that p to be like /a/file/? I tried to reverse the string but ended up like ...
[1 reply] : The key is clearly the delimiting character '/'. There are many ways ... (by Chervil)
by rcast
Simple program to read and output
 
I'm on chapter 2, Thinking C++ - I wanted to challenge myself so I tried to take what I learned thus far (vectors, fstream, iostream) and create a program that ...
[1 reply] : Nevermind, I just figured it out - I had to output v not line: for... (by rcast)
Close Program! but why?
 
#include<stdio.h> #include<conio.h> int main() { int x,y,z; printf("Input 3 numbers: "); scanf("%d %d %d",x,y,z); if((x>y)&&(y>z)) printf("The ascendi...
[4 replies] Last: its okay now thanks Zhuge chipp:devC++ (by zegdrick)
Help reading .txt file.
 
So I am relatively new to c++ and have read a lot of different documentation on reading information from a text file but for some reason I can't get this to wor...
[5 replies] Last: lol np. And if you're going to do anything with the numbers, i.e. Addi... (by Lynx876)
Is there something wrong here?
 
Hello guys, im doing this practice assignment from this book im reading about C++, im supposed to make a Coin Flip stimulation, and everything seems to be fine,...
[10 replies] Last: Thanks man ;) (by Dexterr)
Naught's and Croses
 
Hi I am currently creating a naught's and crosses program for a college assignment and have come across an undeclared identifier error and I am not sure how to ...
[4 replies] Last: Thank you very much (by kingchappers)
loops
 
does anyone know how long 36^10 loops should take approximately? with about 1 function each iteration. i mean like is it an doable amount or will it take hours.
[4 replies] Last: o okay haha. i guess ill lower it to 36^7 loops then or something. tha... (by gelatine)
what interesting and useful stuff a lonely c/c++ programmer can do ?
 
i am a hobbyist programmer looking mainly for fun (some cash is not bad tbh) , i have programmed before in VB6 ,c# and some c++. i realize that c/c++ is used he...
[14 replies] Last: I've been misinformed by some friends who were raging at iOS and Andro... (by LB)
by tatai
combination of data
 
I have a file with 4 columns of data. each column has 10 rows of data. I want to do all possible combinations of these 4 columns. col1 col2 col3 ...
[5 replies] Last: use 4 for loops. (by tntxtnt)
by Elize
Should be using overloaded function, using parent function instead
 
This is kind of complicated so I will try to simplify my problem. Say I have a class Shape, and classes Triangle and Square extend it. Shape has a getColor fu...
[6 replies] Last: I thought maybe your use of -> was important, but Picture stores a S... (by cire)
by gladi
Using const with pointers
 
Hi guys, I have problem to with this code I couldn't pass the value and print it out. this is Original code: # include <iostream> using namespace s...
[19 replies] Last: You may pass an argument by reference. For example #include <iostrea... (by vlad from moscow)
Need help, no idea on how to do
 
Hi, I created a simply code of getting the current date. Now, I noticed that after compling the result is 3012013. But, what I want is 30/01/2013. How do I do ...
[5 replies] Last: Coder777 JLBorges venkyHyd Thank you for the replies. Appreciate it ... (by MarcusFenix)
by Pebble
Codeblocks not printing £
 
I ran a program that had a £ in a string but it's printing a 'u' instead. In the string the £ is underlined in red. Anyone know what's causing this?
[6 replies] Last: Thank's for the replies, #include <iostream> #include <fcntl.h> #i... (by Pebble)
how to solve C2084 error.
 
void line_equal() { cout<<"\n\t\t"; for(int i=1;i<=58;i++) cout<<"="; cout<<"\n"; } void line_star_small() { cout<<"\n\t\t"; for(int i=0;i<=40...
[10 replies] Last: This article may help: " Headers and Includes: Why and How " http://w... (by Chervil)
by DELB
Adding a Scoring System to a Word Jumble Game
 
Hi, I bought Mike Dawson's C++ Game Programming book on Amazon but I'm a little bit stuck on how to add a scoring system to the "Word Jumble" game within the b...
[5 replies] Last: Your use of enum fields {WORD, HINT, NUM_FIELDS}; is somewhat unusua... (by AbstractionAnon)
Completely Confused with Selection Sorting
 
Hi there, So, I am having quite a lot of problems working on this program. It is suppose to be a program that uses selection sorting to sort a list of employ...
[3 replies] Last: Hooray! I Figured it out! Was actually a simple fix, the for loop was ... (by Merriak)
Looping string bug
 
Hi everyone. I am teaching myself C++ in my free time and wrote the following as an exercise (which i might have got from this website).Also please know this is...
[8 replies] Last: After some testing it seems my only option left would be to make it a ... (by Synergy)
Help with finding number of elements
 
The situation is that I have an array: a : filled with 10 integers. I need to create a function that will find and return the number of elements that are >=...
[1 reply] : #include <iostream> int num_of(int array , int size) { int num =... (by MiiNiPaa)
help needed
 
C++ program to perform error repair for the given erroneous string.
[1 reply] : What kind or errors does string have? What kind of repair needed? What... (by MiiNiPaa)
by reidt
Help with Pointers and functions!
 
Hello guys, totally new to programming so pardon me if this is a really dumb topic to ask! I understand basic pointer theories, but I can't seem to wrap my head...
[4 replies] Last: - why do you say that in the above code there is no need to pass by r... (by MiiNiPaa)
January 2013 Pages: 123456... 52
  Archived months: [dec2012] [feb2013]

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