General C++ Programming - May 2010 (Page 22)

by Oskar
Char Pointer Printing
 
Hello! i dont understand how you can do this: #include <iostream> using namespace std; int main() { char *pName = "C++"; cout << "pName: " <<...
[4 replies] Last: Thank for the answer guestgulkan i know that *pName will print C. I wr... (by Oskar)
by jmalo1
c++/OpenGL on Xcode
 
I use a mac and have xcode. I know how to open up the C++ console application, but how to I add opengl to that?
[1 reply] : Add OpenGL to a console? What what what? If you want to render grap... (by Albatross)
Segfault during seemingly normal copy operation
 
I get a segfault here on line 29: #include <iostream> #include <fstream> #include <string> #include <vector> #include <cctype> using namespace std; ...
[3 replies] Last: Ah, I found it! You see, headers is an empty vector! The segfault is c... (by m4ster r0shi)
solve this problem
 
this is the Q: Write a function named FirstOcurence that takes as parameters an array of char(c-strings) and a character c. The function should return a poin...
[9 replies] Last: Okay. To put all of this in far nicer terms, most of us regulars on th... (by Albatross)
by Qu3st
Multiple definition of 'main'
 
the program i am writing is to calculate the volume of a cylinder. however, an error is occurring saying that there is a multiple definition of 'main' this i...
[4 replies] Last: thank you very much (by Qu3st)
Minsweeper text game problem
 
today i started programming a small text version of minesweeper, and even though i'm going to embarass myself as being a noob..again.. but whatever, the program...
[1 reply] : ok i think i found how to solve it i'm going to write it here if i hav... (by subarde)
double inverted comma as strtok delimiter
 
Hello everyone, i am new to this site and to C also. I found this site very helpful. You guys are really doing well. Actually i want to use strtok function to...
[2 replies] Last: Are you escaping the quote like this: strtok(str, "\""); ... (by Galik)
Quickish Data Structure Question
 
When you implement a data structure like a linear linked list as a class is it wrong to have the lll object be a member of your data class? Should it be the oth...
[1 reply] : The general rule that applies here is the use of templates : //... (by m4ster r0shi)
dynamic memory
 
When you free the memory of dynamic memory, like: char* text = "Hello World!"; delete text; it frees the memory that text used of course. But how will a ...
[5 replies] Last: What jsmith and helios want to say about your example is that the memo... (by m4ster r0shi)
Vector as a class member
 
I have an assignment where I have two objects, and one of them has a vector as a member. I have to operate with the vector, both in the other object and in main...
[4 replies] Last: No problem. (by Mythios)
Dynamic memory of double array
 
Below is the dynamic memory of a single array from your tutorial, can you tell how to define for a double array? Tks =========================================...
[2 replies] Last: Tks. It helps very much. (by jcheng3305)
by jbl09
what is preventing the arithmatic from displaying?
 
(code not restricted to column of text file my text file: Monday Tuesday Wednesday Thursday Friday Saturday Sunday 34252 85776 65746 93453 63534 34335 0 ...
[2 replies] Last: You didn't parse shit by the way. Not sure what you think you rputting... (by closed account S6k9GNh0)
average function
 
Almost completed my project. Instructor says " need to call the avg funtion before you have the values of the array, call the average function after the values ...
[6 replies] Last: I didn't use anything to advanced (or tried not to) and gave a freebie... (by closed account S6k9GNh0)
How should I call this function into my main?
 
I need to know how to call the displayOutput function into my main function in order to display the data. #include<iostream> #include<iomanip> using na...
[5 replies] Last: I manged to get it to display everything except bonus pay and total pa... (by Reaper8290)
May 2010 Pages: 1... 202122
  Archived months: [apr2010] [jun2010]

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