Beginners - April 2010 (Page 5)

by Cyan
I'm having trouble picking a programming tool
 
Hello, this is my first post here. I am a complete beginner and you'll probably see me a lot here. Anyway, I followed your advice and downloaded Visual C++, but...
[3 replies] Last: I suggest to look for some tutorials or something like that to get fam... (by magnificence7)
by Groo
Still doesn't work.
 
I can't get this program to work right. It reads and displays the file it's supposed to, but it won't figure out the max and display it. I've posted this a coup...
[2 replies] Last: There is so much wrong I don't know where to start but just a few thin... (by closed account z05DSL3A)
Templates error, inheritance
 
Hello. I have a problem in one of my projects and can't seem to locate it. Can someone please help? I have these two classes template <class TE> class I...
[2 replies] Last: Thank you. I wrote it as IAddress<TE>::info and now it works. Unfo... (by Ratzian)
Error "Floating point exception" Prime listing program
 
I am working on a way to efficiently check to see if an integer is prime, mainly by checking to see if it is divisible by all the primes that preceede the inter...
[no replies]
by Gorgro
Dynamic array of objects in a class.
 
I have an assignment wherein i have to make a dynamic array of objects, which has to be made in another class. This leads me to write something like this in the...
[3 replies] Last: Ok, i made some adjustments and i got most of the errors out, but now ... (by Gorgro)
pointer and constructor
 
#include<iostream> const int size = 2; using namespace std; class Human { protected: string name; public: Human(strin...
[8 replies] Last: Dunno. Just a language limitation I guess. (by Disch)
by dumas9
string to char[] conversion
 
Can someone explain how this works //std::string s char *a=new char[s.size()+1] a[s.size()]=0; memcpy(a,s.c_str(),s.size()); An explanation of how e...
[5 replies] Last: can I use strncpy or strcpy to do the same ? No. Actually, strnc... (by imi)
by besc
Why in the world? (1,2)
 
Well here it is. The simplest of simples wont compile. Im using wxDev-C++. When I try to compile this I get the message "Why in the world would you want to comp...
[30 replies] Last: Peace on Earth http://www.youtube.com/watch?v=jzw6GiqZyD0&feature=rel... (by blackcoder41)
My C++ teacher said global variables are bad practice?
 
Why is this, they seem to be the easiest way to get what I need to get done - done.
[4 replies] Last: - two functions may modify the same variable After i had this ... (by AngelHoof)
Letter counter from file
 
I have writen this code to count the number of time a letter that appears in a file. It should count both upper and lower case letters. I have written the code ...
[5 replies] Last: I just posted something like this, for a code review (currently on pag... (by Leppie)
Array piece entered by user
 
I am trying to expand the following program to allow users to enter an employee ID (part of an array) so they can get information (wage, how much above max, how...
[no replies]
Declaration and initialisation of variables
 
Hi all, What is difference between, int a=10; and int a; a=10; I have checked executing a sample code in assembly mode but i didn't find any diff...
[3 replies] Last: +1 Disch (by jsmith)
invalid conversion from `char*' to `char'
 
I dont want to show too much of the coding as this is an assignment. Anyways what I want to do is read into a text file and obtain what is written and lets just...
[2 replies] Last: Hi JRaskell Thanks for that. I had to alter the class to take in c... (by joeyjojo)
by jbl09
how do i input data from a space delimited text file?
 
there are 7 days of the week in the file, and i need to input them, but not as a line but as separate units...after that first line, then there will be seven mo...
[2 replies] Last: okay, i want it to read the days that are in the same line individuall... (by jbl09)
Problem initializing or displaying 2-D array to zero
 
Hi, I want to initialize a 10x4 array to zero. The problem is that when I display it using a "cout," the elements of the tenth row display as something like: ...
[2 replies] Last: The initialization looks fine but what's with the format specifiers ju... (by kempofighter)
Sort Function
 
My instructor gave us a program that consists of a <list> of doubles. Our assignment is to create a sort function that utilizes selection sort, insertion sort, ...
[3 replies] Last: No it uses pass by value. the iterators are objects that are being pa... (by kempofighter)
Question about the Recursion
 
Example: // num = 5; void test (int num) { cout << "Testing " << num << endl; if (num > 0) { cout << "Trying" << endl; test(num - 1); } cout << "Returni...
[3 replies] Last: Because you call the test function 5 times, starting with num being 5 ... (by closed account S6k9GNh0)
How to get the execution time for a bubble sort ?
 
How can we know the execution time for a bubble sort for an input size like 2000000 ? thank you
[1 reply] : http://en.wikipedia.org/wiki/Bubble_Sort#Performance (by Bazzy)
Problems with my first class.
 
Hi! Sorry my first post is asking for help. This is supposed to be able to work with a user's information and, in the end, calculate the student's GPA. We'v...
[3 replies] Last: no no no, this is wrong. You will have all sorts of linker errors if ... (by Disch)
What does this program mean?!
 
the questions I have about this program are; what does key word string mean and how is it used in this program? can someone break this down and explain this ? M...
[5 replies] Last: http://www.lmgtfy.com/?q=c%2B%2B+help There you go... (by packetpirate)
April 2010 Pages: 1... 34567... 35
  Archived months: [mar2010] [may2010]

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