User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 397,634 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,348 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 9 of 9
Search took 0.01 seconds.
Posts Made By: welles
Forum: C++ May 5th, 2008
Replies: 15
Views: 947
Posted By welles
Re: 2D array memory allocation error

That's exactly the part that I missed out, I got the program working now. Thank you so much for your helpful comments, mitrmkar and salem, I am very appreciated for your time and comments.
Best...
Forum: C++ May 4th, 2008
Replies: 15
Views: 947
Posted By welles
Re: 2D array memory allocation error

Thanks for the replies.
I still can not get this program to work. I changed the method getMapInfo() to this:

void MapInfo::getMapInfo(std::string file_name)
{
char str[256];
int max_corner_no =...
Forum: C++ May 4th, 2008
Replies: 15
Views: 947
Posted By welles
Re: 2D array memory allocation error

Hello, Salem,
I did some modifications of my code as you suggested, and here is what I got:

#ifndef MAPINFO_H
#define MAPINFO_H
#include <iostream>
#include <vector>

class MapInfo
{
Forum: C++ May 3rd, 2008
Replies: 15
Views: 947
Posted By welles
Re: 2D array memory allocation error

Hello, Salem,
Thank you so much for your helpful comment, It really helps me a lot.
Best Regards.
Forum: C++ May 2nd, 2008
Replies: 15
Views: 947
Posted By welles
Re: 2D array memory allocation error

Hello all,
So I am just wondering if I can do this in c++:
I got one class (called "MapInfo")with 2 member functions, one is used to get the content of the file and save all the numbers in the file...
Forum: C++ May 2nd, 2008
Replies: 15
Views: 947
Posted By welles
Re: 2D array memory allocation error

Hello, mitrmkar,
Thank you for your reply.
I have looked at some references on passing by value and passing by reference, so basically instead of passing the entire object as the function argument,...
Forum: C++ May 1st, 2008
Replies: 15
Views: 947
Posted By welles
Re: 2D array memory allocation error

Here is the file "mapInfo.h"

#ifndef MAPINFO_H
#define MAPINFO_H
#include <iostream>
#include <vector>

class MapInfo
{
public:
Forum: C++ May 1st, 2008
Replies: 15
Views: 947
Posted By welles
Re: 2D array memory allocation error

Hello, Salem,
Thank you very much for your reply, regarding to that:
> for (int i=0; i<=no_of_blds-1; i++)
> bld_info[i]=new double[max_corner_no*2+3]; //*2 because we need x and y coordinates, >rest...
Forum: C++ Apr 30th, 2008
Replies: 15
Views: 947
Posted By welles
2D array memory allocation error

Hello, all,
I am pretty new to C++ and I need to write a program for calculating radio propagation path loss based on ray tracing, C++ is used for its faster processing rather than MATLAB. I have a...
Showing results 1 to 9 of 9

 
All times are GMT -4. The time now is 10:01 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC