General C++ Programming - October 2009 (Page 6)

C style char arrays
 
If I read in characters into a char array using cin, why do I need a constructor for the char array?
[6 replies] Last: @compone87: I think the confusion is over your phrasing. You hav... (by jsmith)
Loading from a .csv file
 
I've done this before but I've gone brain dead / blank arghc! void LoadDataBase( std::vector<D...
[7 replies] Last: If anyone wanted to see the solution : void LoadDataBase( std::v... (by Mythios)
binary file read problem
 
The file I am reading is a binary file. In that file the first I am reading names terminated by '\0'...
[5 replies] Last: hi guys, You can input \0 in the binary file . I was able to read i... (by kai5gabriel)
by sporx
standard deviation and skew. due today
 
my program is almost complete, however i have two problems. im not quite sure if i did the standard ...
[3 replies] Last: yes, however i've never been taught vectors.. any help? (by sporx)
by nikman
vectors?
 
int loadCarts(string filename,SnackCart *&carts) { carts = new SnackCart; ifstream dataFile(fi...
[8 replies] Last: ok thanks :) (by nikman)
by NGen
Returning a Char Array
 
I know the process of returning a char array is simple, but returning an array without any memory le...
[8 replies] Last: I see what you mean. Sorry, I was thinking about something else, but m... (by NGen)
by yygyt
"extern" problem
 
On Ubuntu, I am trying to compile a GL project consisting of 3 source files. One of them which has t...
[2 replies] Last: I knew it was a linking issue. I just didn't find how to link these fi... (by yygyt)
sizeof Explanation
 
Can someone please explain the behviour of this code #include <stdio.h> #define SIZE 10 vo...
[8 replies] Last: Sorry, I meant (strlen(arr)) * sizeof(int*). I must have unconsciousl... (by helios)
Pointers
 
I have the following questions: For parts b-e, repeat the declaration and use the results from a. ...
[3 replies] Last: e) After executing *py = *px, are &x and *py equal? (I say yes. py no... (by JCED)
by JWP321
error regarding class
 
Hello, I'm receiving an error when I compile my code for "project06.triangle.cpp". How can i fix the...
[4 replies] Last: ah, that makes more sense. thank you. (by JWP321)
Pointer Question
 
Hey guys, I have a question as to whether or not I am assigning the following correctly. The que...
[1 reply] : It's correct. (by helios)
2-dimensional arrays
 
I'm trying to take a list of student id numbers along with a list of grades for each student for 5 q...
[4 replies] Last: Thanks for posting a sarcastic comment when you obviously didn't even... (by cardinals03)
C++ program failing to rename a file
 
I have a C++ program running on Windows XP compiled with Visual C++ 6.0 containing the following cod...
[1 reply] : Your doing something that the program can't account for and making it ... (by closed account S6k9GNh0)
by sporx
taking the median of an Array
 
solved!=]
[4 replies] Last: i tried just using the 2.0 and it gave me errors. ill try and make thi... (by sporx)
by alias
For Loop not continuing
 
I'm writing a code that counts numbers using a for loop. I'm stuck on the part of the code that has ...
[1 reply] : for( ; ; ) is an infinite loop unless you have a break statement in... (by jsmith)
Resource Locking / Mutex
 
BgInfo: I am creating a MUD style game that is multi-threaded (under win32). Within it there is a la...
[9 replies] Last: Oh, now I understand what you mean. No, if you want to use my method y... (by helios)
ID3DXSprite vs a textured square
 
Can anyone tell me, is there any big difference between these two? Can I use effects with sprites? ...
[2 replies] Last: Indeed it is. I figured that many of those who know c++ may be familia... (by hamsterman)
Searching for class objects in memory.
 
Is it possible to search for instances of a class in memory by comparing the bytes that contain the ...
[15 replies] Last: Just remove the static from the two variables. Neither needs to be st... (by jsmith)
Program Design issues
 
Can anyone please help me out. I'm barely 3 weeks into C++ and i have an assignment to design, devel...
[no replies]
2 DIMENSIONAL ARRAY!!!
 
As of now my program as the user input an expression like *2x and then the program outputs it as ...
[6 replies] Last: thanks for all the advice. I was able to get it to output the zeros h... (by whitey300)
October 2009 Pages: 1... 45678... 17
  Archived months: [sep2009] [nov2009]

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