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

Function Problems (1,2,3,4)
 
Is there any way to make this function not throw an error during compile? void opt (int number, char *variable) { char *name; char *type; switch (number...
[69 replies] Last: Yes, marking the thread as solved is only a help for other people sear... (by Duthomhas)
by amaac
Code doing something Crazy (1,2,3)
 
I am creating a journal that saves and loads from a .txt file. I am having some problems with a simple center alignment of my print month function, my function...
[57 replies] Last: I can't remember but there must have been a reason. </flamesuit> (by chrisname)
Stack corruption
 
Hi, I'm writing a program with binary tree. The program runs perfectly ok, no syntax errors, no logical error, but when it terminates, i got this error msg ...
[15 replies] Last: yes!!!! ^^ (by oo05ntv10oo)
linked list problem
 
hello all. i've made been a .cpp that is supposed to retrieve 2 lists from user, and then prints either one. this isn't all my code, but it is what i think is w...
[10 replies] Last: THANK YOU!!! (by TheElder777)
Making my c++ program run while other programs do
 
I want to make a program that runs at the same time other programs do. I want the program to run in the background, and at the same time. So it works as normal,...
[14 replies] Last: OK, I like Disch. Thanks =) You seem pretty cool too, now that w... (by Disch)
Memory leak
 
Hi I seek help from experts in c++ I have the following code im working with dynamic array //The value item is inserted into the Container at the location ...
[10 replies] Last: The constructor is the place to assign memory to your class member var... (by Galik)
calculating cube normals
 
Hi, Given a 3D vector representing the front face normal of a cube, how could I calculate the normals for the rest of the faces? Doing the back face is easy ...
[no replies]
by Anzo
Adding a pause to a program
 
Can some tell me how to add a pause to a program and let the user enter a space or strike enter key to resume the program?
[2 replies] Last: I'd like to add that you should call cin.ignore() like this: std::ci... (by chrisname)
calendar
 
few years ago I wrote the small codes on visual C++ which was printing calendar of any years and any month. Now I am trying to compile again the same codes on ...
[2 replies] Last: Correct, on line 24 and 25 is constants without declaring type of cons... (by fotoni2)
by squ
2nd part of c++ assaignment
 
This is my code #include <iostream> #include <fstream> #include <iomanip> #include <string> using namespace std; int ReadProjectTasks(int EventList...
[5 replies] Last: I'm going to post your code in between [co de] tags so that it will b... (by Galik)
by Anzo
The do loop of my program is not working as expected (1,2)
 
Hello, here is a program that I wrote and run on visual studio 2008; after a compiled it I notice that some statements (cin.getline()) of the called functio...
[21 replies] Last: Hello Guys, I want to tell you all that I appreciated your contributi... (by Anzo)
by gump
Meaning of "in" in CORBA
 
What is the meaning of "in" in parameter lists in CORBA? E.g. double corba_cmdr( in double destro );
[3 replies] Last: IN means the parameter is only for data input. After you compile it... (by RedX)
The old const pointer problem
 
I am writing a Polygon class. The idea is that it should be immutable: ie, you specify the vertices at construction, and then it cannot be modified. I need to b...
[1 reply] : Why not implement your own iterator that does just that when dereferen... (by helios)
by vish
array and list combined
 
create a double linkedlist structure is like we have an array of 4. and from each array member we create a list of 3 nodes.
[1 reply] : list<int> thelist; ... did create an list :D:.. (by Incubbus)
by therod
Passing bool as an expression
 
I have some MT4 code I am converting to C++ and I have run into a problem with passing a bool expression to the function. The MQL function is: bool iifBool(...
[2 replies] Last: I'm not sure your code is doing what you think... You cannot defer ev... (by Duthomhas)
delay (wait)
 
I need to delay execution of some parts of my codes. I am Ubuntu user so, I can not use <windows.h> and its sleep(minutes) function. The codes which i am using ...
[14 replies] Last: thanks a lot! usleep() works fine. (by fotoni2)
by ela
i encounter an error message
 
hello, am running a c program in visual C++ 2010 express,when i type the below code it keep running and after it give me the message that myfilename.exe has e...
[no replies]
by jhapk
Reading files from a specific location
 
Hi, how do I make the C++ code read data files from a specific directory where I have all my data files stored rather than copying the data file always to th...
[2 replies] Last: that worked. Thanks (by jhapk)
by CDS
Loop function ifstream files
 
Hi there, I have a function that passes reference of infiles and outfiles from fstream and will run again if user answers yes. However, the second time through ...
[15 replies] Last: Hey thanks for help everyone! I got it, I had to replace all of the br... (by CDS)
'list' is used as a type, but is not defined as a type.
 
I created a class called Vertices and one of it's data members is a list of integers representing which Vertices that specific vertex points to. Here is the ...
[13 replies] Last: Also, sometimes the point of including a header is to include a whole ... (by Duthomhas)
May 2010 Pages: 1... 1011121314... 22
  Archived months: [apr2010] [jun2010]

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