473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

combining workspaces

I have two different set of codes (say A and B workspaces) I want to
call the entire B as a function inside A.I want a solution to do this.

To my knowledge, one soltn. would b to add all files of B in A's
workspace and compile like any other fnuction but, the pblm here is
both B and A are huge piles of codes and at many places happen have
same variables ( in their declaration in header). so, for this soltn.
to work, I`ll have to change all the variables in their headers and in
..C in B's workspace ( which is a HERCULIAN task, considering the
voluminosity of the codes).

Points here to be noted abt the program are:
1) A calls B in a loop and gives an input and needs an output.
2) B does not need to hold any variable betwn its entry (in other
words) shortly/vaguely, B does not need to have any static variables.

Is there a way like, when I call B the entire A's workspace goes behind
the screen and does not have any clashes betwn same variables decalred
in headers of A and B.

I have no idea of C++ and would like to know if there is a solution to
this either in C/C++ compiler ( thou a soltn. in C wud save my time).

bye,
hurry.

Mar 9 '06 #1
4 1987
* hurry:
I have no idea of C++ and would like to know if there is a solution to
this either in C/C++ compiler ( thou a soltn. in C wud save my time).


That means you're off topic clc++ (this group). Try clc.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Mar 9 '06 #2
c if u can hlp me now.

I have two different set of codes (say A and B workspaces) I want to
call the entire B as a function inside A.I want a solution to do this.

To my knowledge, one soltn. would b to add all files of B in A's
workspace and compile like any other fnuction but, the pblm here is
both B and A are huge piles of codes and at many places happen have
same variables ( in their declaration in header). so, for this soltn.
to work, I`ll have to change all the variables in their headers and in
..C in B's workspace ( which is a HERCULIAN task, considering the
voluminosity of the codes).

Points here to be noted abt the program are:
1) A calls B in a loop and gives an input and needs an output.
2) B does not need to hold any variable betwn its entry (in other
words) shortly/vaguely, B does not need to have any static variables.

Is there a way like, when I call B the entire A's workspace goes behind
the screen and does not have any clashes betwn same variables decalred
in headers of A and B.

bye,
hurry.

Mar 9 '06 #3
hurry wrote:
c if u can hlp me now.

I have two different set of codes (say A and B workspaces) I want to
call the entire B as a function inside A.I want a solution to do this.


C++ doesn't know about "workspaces". Maybe namespaces can solve your
problem? Works like this:

namspace A {
int somevar;
}

namespace B {
int somevar;
}

now you have different A::somevar and B::somevar. YOu could e.g. (with
care) do:

namespace A {
#include <aheader1.hpp>
#include <aheader2.hpp>
}

etc.
Christian
Mar 9 '06 #4
hurry wrote:
c if u can hlp me now.


i cnt hlp u.
And repeating the question won't change the fact that it's off-topic. C++
doesn't define such a thing as a "workspace", and neither does C. My guess
is you're talking about some kind of programming tool, which is off-topic
here. Try finding a newsgroup about programming for your
compiler/toolchain/system/...

Mar 9 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Chris Mullins | last post by:
I've spent a bit of time over the last year trying to implement RFC 3454 (Preparation of Internationalized Strings, aka 'StringPrep'). This RFC is also a dependency for RFC 3491...
3
by: alwayswinter | last post by:
I currently have a form where a user can enter results from a genetic test. I also have a pool of summaries that would correspond to different results that a user would enter into the form. I...
7
by: Barry | last post by:
Hi all, I've noticed a strange error on my website. When I print a capital letter P with a dot above, using & #7766; it appears correctly, but when I use P& #0775 it doesn't. The following...
5
by: M.Stanley | last post by:
Hi, I'm attempting to create a query that will combine 2 columns of numbers into one. The followng comes from 1 table with 4 fields (A,B,C,D) A B RESULT 700 000 700000 700 001 ...
1
by: Jan | last post by:
Hi We are developing a trading application in C# using the UIPAB. In this application it should be possible to set up different workspaces with a number of windows. The user should be able to save...
3
by: Flip | last post by:
I'm looking at the O'Reilly Programming C# book and I have a question about extending and combining interfaces syntax. It just looks a bit odd to me, the two syntaxes look identical, but how does...
3
by: hurry | last post by:
I have two different set of codes (say A and B workspaces) I want to call the entire B as a function inside A.I want a solution to do this. To my knowledge, one soltn. would b to add all files of...
5
by: Tristan Miller | last post by:
Greetings. Is it possible using HTML and CSS to represent a combining diacritical mark in a different style from the letter it modifies? For example, say I want to render Å‘ (Latin small letter...
1
by: =?Utf-8?B?UmljaGFyZA==?= | last post by:
Hi, I have a question about Team GFoundation/Team Explorer 2005 - Workspaces. Under which group should it be posted? Thanks in advance, Richard
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.