Beginners - April 2010 (Page 19)

nodes to adjacency matrix
 
Hi All, Please suggest the best way to build an adjacency matrix from given nodes and links. my input wil be as shown 3 2 n1 n2 3 n3 n1 2 The first ro...
[1 reply] : hey can anyone please reply (by cplusanil)
Ways to make change 2.
 
The Question: Tell the number of possible ways you could have made change, if the amount is $10.00 or less. What I've done: #include <iostream> using...
[3 replies] Last: I started working with C++ recently, so this is what I came up with. O... (by Astrumjunior)
Problem (Access violation (Segmentation Fault))
 
Hello My Code leads to Error: Access violation (Segmentation Fault) it is a heat transfer problem which calculate temperature of a canal. #include <iost...
[11 replies] Last: Not going to lie. Why don't you use a debugger so you can find the exa... (by closed account S6k9GNh0)
Writing to a DATA FILE
 
Can someone tell me why my code is not writing to a data file! I get no errors and everything looks great! #include "Account.h" #include <iostream> #i...
[11 replies] Last: Steps on writing to a file: 1) Open the file with correct mode: h... (by closed account S6k9GNh0)
Problem with my loop?
 
Hello everyone. I'm making a small dice rolling game. It's very basic, all text. The problem I'm having with the program right now is: The program doesn't end w...
[8 replies] Last: Sorry to double post(can I call bump?) but, could my problem be that I... (by DeadH34d)
by Crippy
Some kind of mistake?
 
hello! I built a class, compiled it with no problems but windows dos wonn't let me execute the program, it interrupts it... Am I allocating memory incorrect...
[1 reply] : *what = 0 and *what = *str do not do what you want. They cop... (by jsmith)
2Questions
 
I have two Questions 1. I read the topic "Console Closing Down" and people are posting many different ways to end a program. I use Dev-C++ ...
[4 replies] Last: They are BBcode tags used in this forum http://www.cplusplus.com/arti... (by Bazzy)
windows forms
 
I'm developing a series of forms using visual studio c++ and i have a series of text boxes that the user will insert measurements into and after they have inser...
[no replies]
[C++} Using isalpha and isdigit to verify string
 
Hi All, Sorry can anyone advice how can i use isalpha and isdigit to verify if the string is having alphanumeric? I am struggling for 4 hrs on google sear...
[9 replies] Last: Thank you guys. I managed to solve my questions after sleepless night ... (by flubber)
.lib files creation
 
Why the files .lib sometimes are created only after I run the project? For example I go into lib folder and got nothing. But after some files appear lib.
[2 replies] Last: Thx Bazzy. I'm telling this because in my Ogre3D project sometimes the... (by dokfiler)
error C2248: cannot access private member declared in class
 
Ok So i have a program that takes input from a file and tells whether the number is even or odd. Im getting this error in my code though and am confused as to w...
[2 replies] Last: Pass the ifstream object as reference instead of value, i.e. modify ... (by Castaway)
cannot add sys/time.h
 
Hi, i want to measure the time it takes for a sort. #include <sys/time.h> does not work. It says couldn't open source file. Thank you Yigit
[4 replies] Last: http://www.cplusplus.com/reference/clibrary/ctime/clock/ (by Bazzy)
by engguy
DOS program in win
 
Hello, How do I run a dos program in windows? Your help is appreciate.
[1 reply] : IIRC not all the old interrupts are available to the programmer... ... (by Duthomhas)
Null error
 
im trying to make a text based game and i need alot of strings to make it of course but whenever i run it i get this error: terminate called after throwing an...
[1 reply] : It seems that you are trying to create string using char* that points ... (by Denis)
by ToniAz
Class member functions
 
Hello everyone Can we create a function that is defined as a member of a class (lets say class point) and of type "point" and that takes 2 parameters both of...
[8 replies] Last: Why don't you try calling in main this: point m = a.midpt(a,b); ... (by m4ster r0shi)
Dividing String into substrings
 
Hello, i need to divide 1 AnsiString like "s0 s1 s2" into some substrings like "s0","s1","s2", but i have problem with it. Advice me how to do it,please.
[1 reply] : Maybe you can try to modify this program to yours. #include <stdio.... (by qudongfang)
Question about namespaces
 
I had thought that if I used a 'using namespace' that I could define functions in a namespace without having to prepend that namespace. I know that's how it wo...
[1 reply] : No, using namespace only lets you use symbols in that namespace while ... (by helios)
by ToniAz
Class member functions [code]
 
I tried posting the code over and over again in the last post but it didnt work... #include <iostream> using namespace std; class point { publ...
[1 reply] : On line 23 point m = midpt(a,b); This is a member function, ... (by xeyide)
by axel
bad precision when dividing doubles
 
Hi, i'm making histograms by dividing my range in a given number of bins and i've stumbled upon a problem that if it has no explanation, then i think is VERY ba...
[2 replies] Last: Thanks for the reply and the article refered above. I am aware that th... (by axel)
g++ / visual studio c++ problem...
 
Hi, use g++ at home on Linux and visual Studio c++ at work. Am working on 'dungeon crawl' exercise trying to get the 'player' to move using the number keypad. H...
[no replies]
April 2010 Pages: 1... 1718192021... 35
  Archived months: [mar2010] [may2010]

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