Beginners - September 2014 (Page 10)

by vxk
Copying string using pointers
 
Can somebody tell me what is wrong with the following code : void stringcpy(const char* src,char* dest){ while(*src != '\0'){ *des...
[18 replies] Last: Yes there is a need. There is no string without the ending null cha... (by shadowCODE)
by Ch1156
Creating a newline in a string
 
Ok so i'm working with a GUI program that has a text field but it doesnt have a text box, so I figure i can try creating one, but I cant figure out how to add a...
[1 reply] : I guess that you're looking for the insert function of the string: ht... (by coder777)
Any good book with c++ exercises
 
Hi cplusplus community im new to c++ i just started playing around with it a week ago, i also bought the c++ primer book after i saw some warm recommendation ab...
[2 replies] Last: Ok will do:) Thanks for the help:D! (by FilthyPeasant)
by Arnau
Problem with cin
 
Hi, I was trying to make a program that calculates the arithmetic average of all the inputed numbers. The program works but there's one problem. I don't know ho...
[3 replies] Last: Yes: use stringstream and getline : #include <iostream> #include <i... (by MiiNiPaa)
let us investigate parachuting code in C++ together
 
Dear Friends, My supervisor gave me a code about parachuting modelling and told me to go and understand it. I read the C++ book written by Schildt. What is your...
[2 replies] Last: [quote=spring2014]I read the C++ book written by Schildt. *Shudders*... (by MrHutch)
by kemkoi
Problems with a for loop
 
Hello, I'm trying to create a program that makes the user enter a start value, an end value, the amount the value should increase after each loop and some calcu...
[2 replies] Last: Yes it should me i < last and i should be asigned as a float not an in... (by kemkoi)
Neural Networks
 
I wrote a simple neural network and I input training data and save learned weights to txt files. Is there a better way to do this, any recommendations?
[no replies]
by Arnau
Help with program
 
I'm new programming and I need to build a program that tells you when you input an unlimited number of numbers, how many and which numbers finish in the same th...
[5 replies] Last: thanks to all of you !! I solved the problem :) (by Arnau)
converting inches to yards, feet, inches
 
The assignment is to input a number of inches and have the program output the number of yards, number of feet and the number of inches as remainders not individ...
[5 replies] Last: system("PAUSE"); ^^ place that above return 0; Do not do this. R... (by mutexe)
What is wrong with my program?
 
Hello, I am trying to output a specific pattern of hashes in this order (based off of user input) # ## ### #### ##### and # ## ### #### ##### ...
[6 replies] Last: It runs OK using the gear wheel here. Maybe you need to clean and rebu... (by closed account 48T7M4Gy)
by krad23
Confused about including headers
 
So I am using an external library and including its header, let's say <library.h> My project has a number of helper functions in different cpp files, each o...
[4 replies] Last: good point, i checked the library header and it has a #pragma once so ... (by krad23)
Help with do...while problem
 
Hi -- I am very new to C++. I have spent hours trying to get this to work. I have read and reread my textbook and tried emailing my prof but haven't been a...
[2 replies] Last: 1) Please next time post compiling code 2) Main problem you have is th... (by MiiNiPaa)
Help me guys
 
Write your question here. 1. Objective: calculate the distance in miles a ship at sea can see the lighthouse. 2. Requirements: --INPUT height (set by au...
[2 replies] Last: http://www.cplusplus.com/reference/cmath/sqrt/ (by mutexe)
Condition at while not working
 
Hello everyone. Could someone explain me, what's wrong with this code? It doesn't do the condition, which I wrote in the while. Even if i write negative number,...
[7 replies] Last: Anyone? (by immadogewow)
Please help with do while loop
 
Hello, I am supposed to create a program that converts time in seconds into minutes, hours, days, weeks, months, years, decades, century, and millennia. I have ...
[3 replies] Last: Thank you!!! I changed it to long long now it seems to be working :D (by skwigelf)
Help in Loops
 
the program wont run properly.... it shows only the first sentence and thats it.... nothing happen. I think the loop is wrong. but i dont know where. #includ...
[8 replies] Last: Sorry.... my mistake. i get some ideas but still confused... i need to... (by vampirenelf)
Problem displaying arrays across member functions
 
I have this assignment for a class to create a box of 3 types of produce using 5 types of fruits or vegetables, then allow to user to replace something from the...
[1 reply] : I had placed a for loop inside the constructor right after the produc... (by Danny Toledo)
Header, Driver, and .cpp files running together
 
Hi everyone. Just wondering if I could get some help with figuring out what's wrong with my program. As of now, I have 3 separate files that I'm trying to ru...
[6 replies] Last: That's actually what I ended up doing and it fixed my problems. Thanks... (by psychoticbear)
can't get only one statement to appear
 
I can't seem to make it so only one of the two statement appear. In this program, when a user enters two numbers, if the first number entered is smaller, I ...
[7 replies] Last: That's the idea :-) Try it out. The only thing to watch is to avoid du... (by closed account 48T7M4Gy)
How to handle two counter variables in a for loop
 
The output is showing some garbage values! :/ #include <iostream> using namespace std; int main() { for (int y=0, z=20; y!=z; y++, z--) {...
[3 replies] Last: :p Yes, you are right!Thanks (by Knightrider29)
September 2014 Pages: 1... 89101112... 51
  Archived months: [aug2014] [oct2014]

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