Problem with 2 codes for same project

i need help please, i have two C++ (colser to being C codes) on the same project,but VS does not allows them both to build solution,i asked my teacher and she told me that the VS running them together  and told me to run the separately,someone
can please tell me how to do so? i need to do that until tomorrow`s night,please answer that ASAP. thanks for any help

i need help please, i have two C++ (colser to being C codes) on the same project,but VS does not allows them both to build solution,i asked my teacher and she told me that the VS running them together  and told me to run the separately,someone
can please tell me how to do so? i need to do that until tomorrow`s night,please answer that ASAP. thanks for any help
A project can only have one main() function. If you have two, then name them (say) main1() and main2(). Then do something like
int main()
main1();
main2();
return 0;
Or you can run just one of them by commenting out the call to the other.
If something like this does not work for you, then you need to explain more about your code.
David Wilkinson | Visual C++ MVP

Similar Messages

  • CND problem with code-completion

    Hi,
    First of all I don't really know where to put this post about C++ Pack in NetBeans. I've read one post in which someone suggests that this section will be pretty close...
    Maybe someone here would be so kind and try to help me...
    I'm using Ubuntu 7.04 and I have a problem with code completion in NetBeans 5.5.1 CND and I'm a little bit frustrated right now....
    I installed Netbeans, then CND, Created new C++ Project. Added new source file, with #include <GL/glut.h> directive.
    Whole code was compiled without errors, and that's fine.
    There were some problems with linking but I've added "glut", "GL", "GLU" string to linker parameters in Project Properties.
    The main problem is the code assistant. When I'm hitting "glut" and press ctrl+space it shows functions from glut library but when I type "gl" (to type "glColor3ub...") and try to show the code completion pop-up it shows "No suggestions". The same thing is with GLU library.
    I've installed GL, GLU, glut libraries (they all sit calmly in /usr/include/GL).
    I've added the /usr/include and /usr/include/GL to C++ section.
    I think that the Netbeans is able to find those *.h files because, as I said before, the glut (and the glX) functions are shown properly but there is no sign of "gl" and "glu" FUNCTIONS in code completion (the #define values specified in gl.h and glu.h are on the list, but the functions aren't)...
    I don't have idea why glut and glX are working fine, and gl and glu aren't... If anyone have similar problem, know where to look for an answer or have some suggestions I would be much obliged...
    I've seen Eclipse CDT, Anjuta, kDevelop, Code::Blocks, VIM + icomplete... after checking them all there is only one decision - I want to use NetBeans CND. It's user-friendly, fast and I just like it. That's why I would really like to know why the code-completion isn't working in 100%...

    Vladimir,
    The glColor3ub function declaration is in gl.h file (which along with glu.h is included in glut.h).
    Thanks Maxim,
    In the matter of fact since yesterday I've been looking for the reason why the GL and GLU aren't indexed properly by the Netbeans CC and I've found something.
    The GLU library was indexed after deleting
    #include <GL/gl.h>directive. So it means that the gl.h library is messing up.
    I've checked whole file (gl.h) and noticed that the only part which is in conflict with NetBeans is this one:
    #elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
    #  define GLAPI __attribute__((visibility("default")))
    #  define GLAPIENTRYI'm using GCC 4.1 so the expression value is 401, so the GLAPI define looks like the line above.
    gl.h is indexed properly by NetBeans when it is representing "extern", so it should look like
    #  define GLAPI externIt is working fine if you delete this part of gl.h or for example (which I've done) add predefined macro (or change the existing one)
    __GNUC_MINOR__=-200I know that it isn't very clean solution... I'm not happy with cheating NetBeans about the version of installed GCC but unfortunately I am not a specialist in GNU C so maybe someone would find more elegant solution.
    As far as I know the __attribute__ feature makes the GCC more verbose (warnings, errors) but I don't know how much functionality am I loosing in fact...
    Edit: Why the code tags aren't working? :/
    Message was edited by:
    Makula

  • Problem with the% deviation from Project Server 2010 field

    hello
    I have a problem with the% deviation from Project Server 2010 field.
    Within a file or project, this project contains tasks.
    Each task has completed the field% deviation.
    Within the row "Summary" in the field of% deviation does not perform the sum of all fields of tasks.
    Only occurs on certain projects, these projects have the view of PR Progress Report
    Anyone know happens?
    thank you very much

    Hi
    Sorry, I'll be more specific now.
    Within the field% deviation. Your settings in PWA is:
    The formula for field% Deviation:
    Str (IIf ([Job baseline] = 0; IIf ([Working] = 0, 0, 100); IIf ([Working] = 0; -100; Int (100 * ([Job] - [Work Online base]) / [Working baseline])))) + "%"
    Under the heading rows Calculation Summary:
    > Use formula.
    Within the field Allocation Calculation of rows:
    > It is labeled the "Apply unless you manually specify".
    The field [Job] and field [Job baseline] are fields Pack project server.
    The error is in project, in the list of tasks.
    In the top row, this row summary makes the sum of the ranks of the tasks of the file.
    But in my case only in the summary field the same value appears in the tasks.
    In all the cells in column% deviation appears the same value.
    I hope it helps.
    thank you very much

  • Problem with facetime for mac

    hello guy! I've got a problem with facetime for mac.My sister has a I-pod touch fourth generation with factime but i cna't phone her a message come on my mac.It say "xxx can't receive facetime's calls"!Can you help me??

    Thanks, Dah•veed.
    I did see mention of using Google Public DNS while I was searching the forums prior to posting, but to be honest didn't think it was a DNS-related problem.
    However, to rule it out I've set the prefered DNS servers on my router to Google's, but FaceTime still disconnects after 4-5 seconds when calling between me and my brother-in-law.  It doesn't matter who initiates the call.
    As a test, before I made the changes to my router, I logged into FaceTime as him on my MBP and tried calling myself on my iMac, and that was successful.
    The same test between the two iMacs when they were here was unsuccessful, so now I'm definitely thinking it's something on the '08 iMac.
    Now I just need to figure out what...

  • Problem with GarageBand for iOS 6/7 Iphone 3gs / 4

    Problem with GarageBand for iOS 6/7 Iphone 3gs / 4
    Hello,
    On February 16, bought the GarageBand for iOS which was free and so I find and install it on my 3GS .
    Take the demo: Curtain Call Demo
    and within the instruments :
    audio Recorder
    Sampler
    Smart Drums
    Smart Strings
    Smart Bass
    Smart Keyboard
    Smart Guitar
    Keyboard
    Drums
    Guitar Amp
    1.4.1 is the latest version for ios 6.
    Configure my AppleID on a Iphone 4 and install the program , the version I have the Iphone 4 is the orange ( different from 3gs ) icon and put it on the AppStore : ios 2.0.1 for ios7.
    With these instruments :
    audio Recorder
    Sampler ( to download the instrument )
    Smart Drums ( to download the instrument )
    Smart Strings (Download the instrument )
    Smart Bass ( to download the instrument )
    Smart Keyboard ( to download the instrument )
    Smart Guitar
    Keyboard
    Drums
    Guitar Amp ( to download the instrument )
    and if I give what I need to restore tells me if I bought it I did not restore anything and tells me to buy :
    Complete collection of GarageBand instruments and sound at a price of : € 4.49
    As they are 2 different versions ? More than anything I say because I have to pay for the instruments in the 2.0.1 version of the Iphone 4 ... ?
    And besides not wearing demo Demo Curtain Call : (
    GarageBand 1.x If you are upgrading it using iTunes on a Mac or PC, you can restore the original collection of instruments and sounds. There is no need to buy this collection. Press "You've already purchased?" When displayed on iPhone, iPad or iPod touch.
    this puts on the AppStore but I have tried to restore as I wrote above, and does not work. There is nothing to restore.
    regards

    I've been having the same problem. However, I believe my problem is due to the 3G issues I've been having. I don't have internet access even when the 3G symbol appears, so probably my iphone keeps trying to connect to the network and has its battery drained! Have you been having the same issue?

  • Stacked 100% bar chart - Problem with datatips for zero value data points

    I have a stacked 100% bar chart that shows datatips in Flex 4.   However, I don't want it to show datatips for
    data points with zero values.   Flex 4 shows the datatip for a zero value data point on the left side of a bar if the data point is not the first in the series.
    Here's the code that illustrates this problem.    Of particular concern is the July bar.    Because of the zero value data point problem, it's not possible to see the datatip for "aaa".
    Any ideas on how we can hide/remove the datatips for zero value data points ?        Thanks.
    <?xml version="1.0"?>
    <s:Application
    xmlns:fx="
    http://ns.adobe.com/mxml/2009"xmlns:mx="
    library://ns.adobe.com/flex/mx"xmlns:s="
    library://ns.adobe.com/flex/spark"creationComplete="initApp()"
    height="
    1050" width="600">
    <s:layout>
    <s:VerticalLayout/>
    </s:layout>
    <fx:Script><![CDATA[ 
    import mx.collections.ArrayCollection;[
    Bindable] 
    private var yearlyData:ArrayCollection = new ArrayCollection([{month:
    "Aug", a:1, b:10, c:1, d:10, e:0},{month:
    "July", a:1, b:10, c:10, d:10, e:0},{month:
    "June", a:10, b:10, c:10, d:10, e:0},{month:
    "May", a:10, b:10, c:10, d:0, e:10},{month:
    "April", a:10, b:10, c:0, d:10, e:10},{month:
    "March", a:10, b:0, c:10, d:10, e:10},{month:
    "February", a:0, b:10, c:10, d:10, e:10},{month:
    "January", a:10, b:10, c:10, d:10, e:10}]);
    private function initApp():void {}
    ]]>
    </fx:Script>
    <s:Panel title="Stacked Bar Chart - Problems with DataTips for Zero Value Items" id="panel1">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <mx:BarChart id="myChart" type="stacked"dataProvider="
    {yearlyData}" showDataTips="true">
    <mx:verticalAxis>
     <mx:CategoryAxis categoryField="month"/>
     </mx:verticalAxis>
     <mx:series>
     <mx:BarSeries
    xField="a"displayName="
    aaa"/>
     <mx:BarSeries
    xField="b"displayName="
    bbb"/>
     <mx:BarSeries
    xField="c"displayName="
    ccc"/>
     <mx:BarSeries
    xField="d"displayName="
    ddd"/>
     <mx:BarSeries
    xField="e"displayName="
    eee"/>
     </mx:series>
     </mx:BarChart>
     <mx:Legend dataProvider="{myChart}"/>
     </s:Panel>
     <s:RichText width="700">
     <s:br></s:br>
     <s:p fontWeight="bold">The problem:</s:p>
     <s:p>Datatips for zero value data points appear on left side of bar (if data point is not the first point in series).</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">For example:</s:p>
     <s:p>1) For "June", eee = 0, mouse over the left side of the bar to see a datatip for "eee". Not good.</s:p>
     <s:br></s:br>
     <s:p>2) For "July", eee = 0 and aaa = 1, can't see the datatip for "aaa", instead "eee" shows. Real bad.</s:p>
     <s:br></s:br>
     <s:p>3) For "Feb", aaa = 0, datatip for "aaa" (first point) does not show. This is good.</s:p>
     <s:br></s:br>
     <s:p>4) For "Mar", bbb = 0, datatip for "bbb" shows on the left side of the bar. Not good.</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">Challenge:</s:p>
     <s:p>How can we hide/remove datatips for zero value data points?</s:p>
     <s:br></s:br>
     </s:RichText></s:Application>

    FYI.
    Still have the issue after upgrading to the latest Flex Builder 4.0.1 with SDK 4.1.0 build 16076.   
    Posted this as a bug in the Adobe Flex Bug and Issue Management system.     JIRA
    http://bugs.adobe.com/jira/browse/FLEXDMV-2478
    Which is a clone of a similar issue with Flex 3 ...
    http://bugs.adobe.com/jira/browse/FLEXDMV-1984

  • REAL problems with iMessage activation same with Face Time

    I'm having real problems with IMessage activation same with FaceTime, the phone shows the activation is being made but it does not activate!
    Apple ID and password is OK, it's working with other applications
    Any ideas guys?!

    My daughters had the same problem with both of their iPod Touches.  One logged back into iMessage and FaceTime, the other consistently would not login with the same error, "An error occurred during activation.  Try again." 
    Check your date and time.  Its likely incorrect.  Once the date is corrected.  Restart the device. 
    For what ever reason, some devices lose track of the date.  In my case, apparently, my daughters change the date to affect a particular game by advancing the date.  Little cheaters. (LOL)
    Hope this helps!

  • Please Help?! Problems with Viber for iPhone 4s

    Please help!
    I have had problems with Viber for a while now and had given up! But now a few contacts only have viber and not other free messaging apps so I’m trying to use it again but still having problems.
    I have uninstalled and reinstalled a number of times and still have not received an access code. My main problem though is the messaging it would work fine and then I wouldn’t be able to send any messages and I would receive a message go into the app and the message would not appear.
    The other day I reinstalled it whilst at work and worked perfectly could send and receive messages easily. Then when I went home the problem stated again. I then uninstalled and reinstalled again and it worked perfectly, but now back at work I’m having the issues again! I can’t keep uninstalling and reinstalling is there a way this can be fixed?!
    If anyone is able to help me out it would be much appreciated! Thanks

    You activated "Find My Mac," which disables the built-in Guest account and adds a Safari-only "Guest User" pseudo-account. To get the Guest account back, you would have to disable FMM.

  • Problem with mail for exchange after update on E72...

    Hi everyone,
      I updated Nokia E-mail to ver 3.9 on E72. Now I am facing  a problem with mail for exchange. I have configured gmail on mail for exchange. I recieve a warning that "unable to sync contact administrator if problem persist". It started to pop up just after the update was over and is very frustrating. Even previously i used to recieve mails instantly but now it generally takes half an hour for me to recieve them. I deleted and created mail for exchange several times but to no avail.
    Also i am not able to automatically recieve mails other emails which i have configured. every time I have to manually download them everytime.
    Can anybody suggest a way out.
    Thanks
    Anil

    It could be a problem if you're using your network's connections...
    I was on a Pay & Go tariff with o2 some time ago, and needed secure connections for various things, o2 told me they didn't provide secure connections on Pay & Go tariffs...
    Could be worth checking with them to make sure it's supported.
    Nokia History: 3110, 5110, 7110, 7110, 3510i, 6210, 6310i, 5210, 6100, 6610, 7250, 7250i, 6650, 6230, 6230i, 6260, N70, N70, 5300, N95, N95, E71, E72
    Android History: HTC Desire, SE Xperia Arc, HTC Sensation, Sensation XE, One X+, Google Nexus 5

  • Problem with Twitter for Mac notifications

    Hello,
    I have a strange problem with Twitter for Mac. On both my home and office Macs. New posts appear in app window but there aren't any notifications even though notifications are set in preferences to show in both dock and menubar. Perhaps anyone noticed similar strange behaviour? I didn't find anything similar on Twitter forums.
    Thanks in advance.

    Solved by
    Dr.AvituvOct 20, 2014 11:09 PM
    go to Terminal and post this:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/support/lsregister -kill -seed
    if it doesn't have that specific directory try this:
    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -seed
    once the scanning is done (can be short or long, depends on how heavy your system is) RESTART the computer.
    when you're back, go to Apple>system preferences>extensions.... guess who's there.
    I hope it helped.
    The Doctor.
    iMac, OS X Yosemite (10.10)
    To restore Actions extensions for good and other stuff
    THANKS!

  • I have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

    i have problem with fonts for my site, i have used "Lucida sans unicode " family for certain texts. it shows perfect in mozilla 3.5 and mozilla 4. But the font not supporting in mozilla 5.0? please help me

  • I have problems with office for mac  screen resolution, specially with excel

    I have problems with office for mac  screen resolution, specially with excel ?

    For starters, make sure to Check for Updates on any of the Help menus, and make sure the product has all the latest patches. MS did come out with a patch addressing the display issues on Retina Macs. Latest patchlevel is 14.3.2.
    We are talking about Office:Mac 2011, right?

  • Aperture: two browser windows for same project?

    I know that I can have two browser windows, each showing a different project; I want to have two browsers windows for SAME project. Is there a way to do this?

    Can't be done as far as I know. Here's a link to some tips on multiple tabs in Aperture. http://www.apertureexpert.com/tips/2010/9/7/aperture-has-tabseasily-compare-proj ects.html

  • Strange Problem with Code Groups / Codes

    Hey all, have a strange problem with Code Groups and Codes.
    Our data migration team accidentally loaded an early version of our catalog (code groups and codes) in to our 'Gold' configuration client. They then proceed to delete them all via transaction qs41. However, the code groups have been deleted, but not the codes.
    So, basically, no codes groups exist in table QPGR or QPGT but all the entries remain in QPCD with the assigment to code groups. The usage indicator is not set on the codes so why they did not get deleted with the codes groups is unknown.
    The issue that this is now causing us is that we can't recreate the codes groups with these codes assigned as the system thinks they already exist (via a check on table QPCD i would expect).
    Also, i have been unable to recreate what happened did in other clients... seems very strange.
    Any help appreciated.
    Cheers

    Ben,
    You could try SE11, and see if you can delete the records from there.. but I'm not hopeful...
    Otherwise you may need to write a quick ABAP program to delete the data base entries.
    PeteA

  • We have been having a problem with newsletters for a client. The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!

    We have been having a problem with newsletters for a client.
    The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!
    This happened last month too. It seems to be related to length of the newsletter too. It works on every device except iPhones - so weird.

    Hi, is anyone else experiencing i-phone only problems on email campaigns? not bashing Apple, just having issues where our newsletter are only having issues on iPhones

Maybe you are looking for

  • HTTP response contains status code 503

    Hi All, Im working on File to JDBC scenario using MsAccess.My file is been picked by XI from the sender folder (im using NFS at the sender side), but it is not inserting the data in the table which i have created on the server. When i do SXI_MONI , i

  • Adobe flash player and DirectShow filters in IE

    For video capture of webcams for sites with flash (youtube, livestream and etc) I use a driver and DirectShow filter. The user loads a page with flash and chooses a driver or filter from the camera list of flash's Parameters for video capture. My pro

  • Database Data Out Of Date

    The site was upgraded from ZFD 3 to 4. The inventory scan was run overnight but the data shown in the database is not the most up to date. There are str files created in zenworks\inv\scandir. I've tried stopping and restaring Zenworks on the server.

  • Capturing webutil errors

    I am currently implementing forms10g and I am switch all of my for over to use webutil. When running the client_image.read_image_file and I am getting a wut-129 error cannot find image file which is fine, but I want to capture this error or at least

  • The shortcuts I create in the keyboard menu won't save

    After I updated my phone, I lost all of my shortcuts that I had created. So I just made them again, and even when I click save, they still get deleted. I don't understand what's going on.