Beginners - April 2011 (Page 36)

Help - I don't know what I am doing with pointers
 
Hi, I am having trouble with pointers. I have a custom shell program for class I am making. I am having a problem with what I thought would be the easiest...
[1 reply] : You can't strcpy into pathPtr until you give it some memory to which i... (by kooth)
Refrencing the location of an array
 
I'm writing a function in which a char array is scrambled. I know that normally, you have to refrence the location of the variable (&), but when I did this in ...
[3 replies] Last: This is what you must do you must send the array itself. your code onl... (by behzadkh)
Static Member Functions
 
I'm running into some errors that I'm not entirely sure how to correct. I did not write this code - I'm updating it - and I want to ensure I know what the orig...
[1 reply] : It sounds like including that header file in more than one file is vio... (by moorecm)
What's better?
 
I have to compare a set of lines of code for homework... I have: if (Sales >= 500.00) total = 25.00 + .11 * Sales; and also if (Sales >= 500.00) ...
[2 replies] Last: I like your answer. The second one is better because it: - is more cl... (by moorecm)
Lesson issues
 
I'm trying to do this on my own, just started taking a class and need help. Here is the code and the error msg #include <iostream.h> double celsius_to_fah...
[3 replies] Last: Spelling Spelling Spelling Thank you that worked next time before I po... (by ksrandall)
by seerex
Which beginners book?
 
Hi there, i'm currently looking into being rather good at c++. My main goal here is to be able to create games - mainly RPG or those web-based turn games like m...
[12 replies] Last: I agree with Grey Wolf. Also from my experience, game programming is a... (by blackcoder41)
Would like some info
 
I am currently studying cpp in college. The book that we use is great. I use VS 2010, and would like to know if anyone could point me in the right direction in ...
[2 replies] Last: Thank you sasanet, i will look more into it.. Really appreciate it (by Jonny4454)
what's the problem
 
#include <iostream> using namespace std; const short unsigned int NUMVALS = 10; class linklist { private: struct ListNode { int value; L...
[no replies]
explicit template instantation
 
hy, tnx for reading. please tell me why my explicit instantation won't work #include <iostream> using namespace std; template <class rtype, class elem> // ...
[4 replies] Last: ok I get it now :D nice explanation, thank to u I'm free to move to n... (by sasanet)
Dynamic Arrays
 
I'm wondering about the actual benefits of using new and delete in regards to arrays. I just don't see a difference in int array ; cin.getline(array,10); ...
[8 replies] Last: thank you again you really helped to me (by ofrkk)
by tonnot
Help with a map of maps
 
I dont know how to give data to a map of map. I'm lost.... For example : map <int, map<int,char>> map1; Imagine this is row, col data.... - how can I ...
[2 replies] Last: Note that the space is required: std::multimap< int, std::map< int, c... (by moorecm)
Desk checking help c++ (Code provided)
 
Hi, im not too sure how to desk check but i've got a fair idea, though would like if you could use this code as a example to show me how to do it, ive got a que...
[4 replies] Last: Please don't give full solutions, especially without explaining how th... (by chrisname)
Critical Convertion Dec to Hex
 
Hi guys! I'm a begginer in C++ programming and I need a litle help from you... I'm doing an exercice, and I can't do it completly... I must convert a decimal n...
[9 replies] Last: I got it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... (by arathornn)
[C] How to load data from text file like this
 
data.txt ANDY | 2 | male | MARY | 5 | female | BOB | 9 | male MARIA | 8 | female | MICHEAL | 5 | homo | struct _student { int age; char name ...
[1 reply] : try make use of feof() and/or fgets() http://www.cplusplus.com/ref... (by matsom)
prime number function
 
Hey Everyone, What's the function for a program to find a prime number? I basically want to make something that tells me if a number entered is a prime number....
[5 replies] Last: Ok got it... managed to make it go from 1 to 20 automatically. Thanks! (by bluesoleli)
Creating files with fstream
 
I'm having problems in creating files with fstream. The following code piece creates the "change.vi" file, but doesn't create "file.txt". In brief,I can crea...
[2 replies] Last: Hmm ok, I got the idea. As a workaround, the following can be used. ... (by ZephyrTR)
by NvIs
Decimal to binary
 
I'm having trouble figuring out how to convert a decimal such as 4.050 to binary, octal, and hex. I'm familiar using modulus, but since you can't use modulus w...
[3 replies] Last: Perhaps the OP is in a different locale where that number is an intege... (by moorecm)
by aivy
can you answer this?thanks =)
 
write a class course which stores the course id, description, price, duration and another two members of it. You need to declare its members, constructor, and m...
[2 replies] Last: homework service^^ :D (by sasanet)
by red 1
Problem with if statement comparison
 
Hello, I am using linux fedora and I am compiling with g++. I am trying to write a postfix calculator program and I am stuck on one part in my code. I enter "2 ...
[2 replies] Last: Ah I see what I did. Thank you. (by red 1)
Help with sorting an char array
 
I need help with this code: #include<iostream.h> #include<fstream.h> #include<string.h> #include<stdlib.h> fstream f; char s ; void in() { n=0; f.o...
[no replies]
April 2011 Pages: 1... 3435363738... 55
  Archived months: [mar2011] [may2011]

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