Beginners - February 2013 (Page 37)

Using function arrays
 
Hello there c++ programmers. I've been struggling to understand arrays, since a book requires me to use them in a problem solving case. I finally got it t...
[3 replies] Last: I have not understood your question. I can make some comments. Why di... (by vlad from moscow)
by DELB
Example Code Help
 
Take this code here: // Overriding Boss Program.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> ...
[1 reply] : You don't need to implement assignment in this case. The defaults (co... (by kbw)
by fusi0n
strtok returns unwanted empty line
 
Hi, I am tring to strip one text of all the symbols of my choice and print all the words out one by one on separate lines into another file. Every time I reach ...
[1 reply] : I would like to ppoint out that the string literal in the statement be... (by vlad from moscow)
error: ISO C++ forbids comparison between pointer and integer
 
Well I'm not exactly sure what the error means, but it's error: ISO C++ forbids comparison between pointer and integer [-f permissive] Here's my code, the pr...
[3 replies] Last: By the way your array method will always contain symbol '\0' because i... (by vlad from moscow)
Trouble with Linked Lists Delete Function
 
First: This is for homework and no I am not asking for the entire solution I just need help figuring out how to do this. Now, I've been really sick the past few...
[1 reply] : What happens on line 10 of DeleteItem if it's called on an empty lis... (by cire)
.cxx/.h class - Initializer Expected
 
I've ironed out all of my errors but one: In file included from UnsortedType.h:1, from UnsortedType.cxx:1, from driver.c...
[no replies]
With for loop, printf is working strange.
 
<ex1> #include <stdio.h> int main(void) { int arr ={1,2,3,4,5}; int *ptr = arr; int i; for(i=0; i<5; i++) *(ptr+i) += 2; for(i=0; i<5; i++) ...
[1 reply] : in the 2nd one the "printf("\n%d", arr );" is not part of a for loop ... (by Darkmaster)
by cotro
error: undefined reference to:
 
I am getting these three error messages: In function `RayTracer::trace(Image&, Scene&)':| |45|undefined reference to `Scene::getSphereReference(int)'| |50|u...
[3 replies] Last: Thanks to both. (by cotro)
Extracting & Reprinting Digits
 
Hello, this is my first post. I am trying to write a simple program that asks the user to input an integer and then extracts and reprints all the digits sepa...
[6 replies] Last: Do as chervil suggested and put the digits in an array. Or extract t... (by Lowest0ne)
command line parameter
 
Hey guys, I'm working on a program on ubuntu that will count the number of 1s in the binary representation of a number. The program has one command line parame...
[1 reply] : It will work only if you will return anything in you numOfOnes functio... (by Smac89)
currency calculator
 
I am new to c++ and am having to make a program that converts different currencies to and from US dollars. It asks the user whether converting to or from, then ...
[no replies]
by MrGuy
How to save a game
 
I made this game but what I want to do now is save it so I can come back and play it again, but I do't know how to do that so if anyone can help then thanks.
[3 replies] Last: thanks ! (by MrGuy)
Help with classes, arrays, and sorting
 
Hey guys, I am really struggling to understand how to use a array to store a value from a class and then sort it. I have only used classes once and pretty much...
[3 replies] Last: 1. How exactly do you mean, without all of the double colons ? The s... (by xismn)
Help with Program (error problems)
 
Hello! I am creating Palindrome problem and I am getting these two errors: recursion.cpp: In function âint main()â: recursion.cpp:75: error: âstrlenâ wa...
[1 reply] : strlen and such are library functions defined for you, defining them a... (by firedraco)
Reading from a File
 
I'm having problems reading data from a binary file. My current code for reading from the file is: SalesDB::SalesDB (const char* fileName) { ...
[2 replies] Last: I made myself a little function in something a while ago (I say made m... (by TheBeardedQuack)
Dynamically allocating objects to Vector
 
Hello, I signed up today in search of help for this C++ problem I have. I am being asked to do this: Adjust your main function so that it: - presents the...
[14 replies] Last: Ahh thanks for pointing that out on line 111. Much appreciated :) (by Jerseppi)
by fusi0n
Crashing problem(probably loop)
 
#include <iostream> #include <stdio.h> #include <conio.h> #include <string.h> int main() { FILE *fp,*fpp; char bla ; char abi = "...
[4 replies] Last: the first loop I guess (by greenleaf800073)
Generating Array values from a function
 
This is the program. What I want to do here is to generate 10 random numbers and save it in the array using a function. Then I will display it using a for loop...
[2 replies] Last: Oh so that's it. I still followed my own code. But instead of using ... (by whimcro)
by giblit
* ePtr
 
What exactly does * ePtr mean, and what does it do? Thanks ahead of time. EDIT: nevermind the source I was looking at he just put a variable name infront of P...
[no replies]
by lwells
Search Directory for file type and copy
 
C++ Noob I am trying to write a small console program to make my life easier at work. I need to back up several files, but the files are usually associated w...
[7 replies] Last: #include <dirent.h> (by closed account Dy7SLyTq)
February 2013 Pages: 1... 3536373839... 67
  Archived months: [jan2013] [mar2013]

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