Beginners - January 2012 (Page 30)

problem with passing array to function
 
I have to program a function that finds the max element in a 2-dimensional array. So I wrote this code: #include <iostream> using namespace std; float...
[3 replies] Last: To make arrays with non-constants, you'll need to use the new keywor... (by Lynx876)
Mastery of C++
 
So, I'm currently a sophomore in college pursuing a BS in CS. I've been browsing some jobs that I've been interested in just due to curiosity. A lot of the jobs...
[3 replies] Last: Thanks for tagging that links. (by mathgenie99)
Loops and Arrays
 
Hello, I am learning C++ as next year I will start college classes and I want to have an advantage of already knowing the basics. I have the following code ...
[5 replies] Last: Those aren't the right commas? I did wonder why the text in my compile... (by zeustacos)
Visual C++ 2005 and 2008.
 
This code, what i made, works in Visual C++ 2005, but doesn't work ir Visual c++ 2008. Visual C++ 2005 if i enter 1,2,3,4,5, than choose drink. Visual C++ 2...
[3 replies] Last: What a mistake. Thank you for help. (by fsdprogramming)
difference between variable-- and variable-1
 
whats the difference between (variable--) and (variable-1) take this code for example(it calculates the triangle number of a given number): #include <io...
[2 replies] Last: i-- will give you the value i and then decrease it by 1. i-1 wil... (by Stewbond)
Class's member is an Object that changes
 
I have a class that has a pointer to another object as one of its members. The class has a method that will reassign another instance of the object. for e...
[2 replies] Last: Oh that's right, I didn't notice it. Thanks. (by Croolsby)
How to read a string using freopen
 
Hello! I have to read a string from a file using the freopen function but it doesn't work. This is the code: #include<stdio.h> int main() { char x ; ...
[3 replies] Last: If you don't reopen stdout, of course it will behave as normal. If you... (by hamsterman)
(Borland) Show()/ShowModal() issue
 
Hello! First of all, thanks for your interest in dealing with the issue. I searched on many websites and consulted quite a few books, maybe I just don't find...
[3 replies] Last: Ha!! It works. Wow - that was easy. If you knew, what I tried before. ... (by Deepling)
by josh17
how a class works
 
please i don't know what's wrong in this class.it is supposed to store employee data and output the emloyee's responsibility. but i don't really know what to do...
[2 replies] Last: @d4rkz3ro. thanks for the tips. actually it's an example given by lect... (by josh17)
String Replace With a Substring
 
Replace all occurrences of a substring within a string by another substring. For example, if the original string is: "abcllo abcre I am". The substring to repl...
[9 replies] Last: I have made the program. Thank you everybody. Special thanks to hamste... (by ITFreak)
How deos recursion work?
 
Could anybody please explain me the working of this program. It gives output: 55. #include <iostream.h> int whatIsThis( int [ ], int ); int main() { cons...
[3 replies] Last: Recursion is a special technique used in programming. Basically it's w... (by eypros)
Dynamic array initialization
 
Hello everyone, I am working on A Star algorithm and I have run into problem I am not sure how to realize. I am loading map from file of chars, where '*' rep...
[3 replies] Last: Use a container. By instance std::vector< foo > v; v.reserve(size); f... (by ne555)
Converting a numbers into a char
 
I'm doing a program that involves putting numbers into an array and then taking those numbers from the array and putting them into a string. I've deduced tha...
[9 replies] Last: Don't need a positive or negative sign for my code, but thank you for ... (by GRex2595)
Algorithm Deviation
 
Hey guys. I am working on this project and having a huge amount of trouble. The assignment calls for me to create a program that reads several numbers from a ...
[2 replies] Last: If you've learned about vectors yet, consider using a vector of intege... (by zerobandwidth)
function that chooses action based on integer value
 
What's that one function that, based on the integer value of the input, will choose an action? The one that uses cases and such.
[2 replies] Last: I believe you're looking for switch() . #include <sstream> #includ... (by zerobandwidth)
Need to cin 2 values from same entry (fractions)
 
Title says it, mostly. Here is the exercise from my e-book in particular: Write a program that encourages the user to enter two fractions, and then displays th...
[2 replies] Last: Wow, I was stuck on that for a good 15 - 30 mins before looking it up ... (by Nuggetslug)
Help please!
 
Hi guys, I am trying to do this problem: Find the Fifth root of the sum of the squares of the first 100 ODD numbers only. (Beginner). This is my code for i...
[6 replies] Last: In code blocks to run system("pause"); we have to include cstdlib so I... (by Dinesh subedi)
Delimited Text File
 
Hello everyone I'm new to this site and to C++, but I do have some programming experience in C#. I've spent the last two or three days learning Java and C++ and...
[5 replies] Last: Happy to help (by histrungalot)
How could i perform searching in 2d array.
 
How could i perform searching in 2d array.For eg 2d array is int arr ={(23 34 45 5),(22 44 55 54)} how could i search 43 from array?
[4 replies] Last: Caprico, i am sorry i am new into this forum and i thought that postin... (by jahanzaib ali khan Iiu)
Counting occurances
 
Hi Guys, Looking for a little help. This is a problem from an older Savitch C++ book, circa 2005 and it's giving me no end of troubles. Also note, I am not ...
[1 reply] : I haven't actually looked at your code, but looking at the problem thi... (by ascii)
January 2012 Pages: 1... 2829303132... 48
  Archived months: [dec2011] [feb2012]

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