Jump to content
  • Advertisement

lincsimp

Member
  • Content Count

    107
  • Joined

  • Last visited

Everything posted by lincsimp

  1. Hi As part of a function which is executed very many times I have a switch statement that will act based on the closed set of inputs S. S={0,1,2,3,4}; I know that the default can never be reached. Is there anything I can do to speed execution without writing jump tables myself? Is there any intrinsic or anything to tell the compiler that it can't happen? cheers
  2. hi how can i give vs2005 a set of include paths to search through for every? cheers
  3. Does anyone have any idea how to change the width of a frame dynamically when a page is loading without it going to its original value and then suddenly changing? cheers
  4. hey I've got a problem setting the width of a frame ("leftFrame") using javascript. this is my page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <SCRIPT LANGUAGE="javascript"> window.onload = function(){ width = document.frames[0].outerWidth; //document.getElementByID("fs").setAttribute("cols","1000,*"); alert('Width = ' + width); } //</SCRIPT> </head> <frameset cols="300,*" frameborder="no" border="0" framespacing="0" id="fs"> <frame src="left.php" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" /> <frame src="main.php" name="mainFrame" id="mainFrame" /> </frameset> <noframes><body> </body> </noframes></html> You can see above what I've tried, but I can't seem to get it to work. Can anyone help? cheers
  5. Yeah, I used: document.body.cols = "whatever" and I got rid of the boy tag at the bottom which, for some reason, sorted the problem.... cheers
  6. Hey there, http://www.matix.co.uk/readyhelp/demo/ When you move the mouse in IE up and down between "Tutorials" and "FAQ" a wait cursor momentarily appears. This does not occur in FF. How can I sort it out? This is the div code: Code: <div class="folder menuitem" onmouseover="this.className='folderhover menuitem'" onmouseout="this.className='folder menuitem'" onclick="this.setAttribute('clicked','true');montre()">Tutorials Cheers
  7. Thanks.For the images I'm using the background repositioning to "preload" them ( http://www.ilovejackdaniels.com/css/preloading-images-with-css/ ). I dont know whether its the images because the problem does no occur if you move the mouse up and down after the ends of the words, even though the background is still being changed. Cheers
  8. lincsimp

    xerces problem

    Thanks, I don't see why it would return null, here's the code: XMLCh tempStr[100]; XMLString::transcode("Range", tempStr, 99); DOMImplementation* impl = DOMImplementationRegistry::getDOMImplementation(tempStr); XMLString::transcode("root", tempStr, 99); DOMDocument* doc = impl->createDocument(0, tempStr, 0); DOMElement* root = doc->getDocumentElement(); XMLString::transcode("FirstElement", tempStr, 99); DOMElement* e1 = doc->createElement(tempStr); root->appendChild(e1); XMLString::transcode("SecondElement", tempStr, 99); DOMElement* e2 = doc->createElement(tempStr); root->appendChild(e2); XMLString::transcode("aTextNode", tempStr, 99); DOMText* textNode = doc->createTextNode(tempStr); e1->appendChild(textNode); // optionally, call release() to release the resource associated with the range after done DOMRange* range = doc->createRange(); range->release(); // removedElement is an orphaned node, optionally call release() to release associated resource DOMNode* removedElement = root->removeChild(e2); removedElement->release(); // no need to release this returned object which is owned by implementation XMLString::transcode("*", tempStr, 99); DOMNodeList* nodeList = doc->getElementsByTagName(tempStr); //DOMNode* test = (DOMNode)root; const XMLCh* value=root->getNodeValue(); cout<<w2n(value)<<endl; can anyone give some guidance???? cheers
  9. hi I've just started using xerces with c++. How can I output the xmlch? const XMLCh* value=root->getNodeValue(); cout<<"["<<value<<"]"<<endl; This just ouptuts [00000000] How can i output the node value? cheeers
  10. lincsimp

    xerces problem

    Thanks! I have this: const XMLCh* value=root->getNodeValue(); cout<<w2n(value)<<endl; I got an error: Unhandled exception at 0x00418755 in LanguageConverter.exe: 0xC0000005: Access violation reading location 0x00000000. at this line: for ( ; *ptr; ++ptr ) whats wrong?
  11. hi In my xml file I have this line: <?xml-stylesheet type="text/xsl" href="../styles/test3.xsl" ?> it alll works fine in IE, but in FF it can't find the stylesheet. How can I change this? cheers
  12. I found: parent.frames['mainFrame'].FunctionName(args);
  13. Hi How can I do this? I know parent.frames["name] lets me access the other frame, but how can I call a function in it?
  14. Hey Apart from game programming I need to spend some time on revision... I'v ethe following function in my prog: unsigned Lookup(string input) { string lookuptable[] = {"adj","adj plural","adv","conj","noun 1","noun 2","noun 3", "noun 4","noun 5","noun irreg","noun/adj","partic","prep","pron","pron/ adj","verb", "verb 1","verb 1 dep","verb 2","verb 2 impers","verb 3","verb 3 dep","verb 4", "verb defect.","verb imperat","verb imperative","verb irreg","verb phrase"}; for(unsigned i=0;i<28;i++) { if(lookuptable=input) return i; } cout<<"type not found "<<input<<endl; return 0; } When compiled in mingw why do I get the error: helperfuncs.h could not convert `(&temp)->std::basic_string<_CharT, _Traits, _Alloc>::operator= [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>](((const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)((const std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)(&ti))))' to `bool' Can anyone shed some light?? cheers
  15. lincsimp

    Quick type question..

    How didn't I spot that!! It should at least have given me a decent error...
  16. hi I'm trying to use boost's build system. I've built jam.exe, but when I run it like this:"jam jamfile" it just spews out this: Jam cannot be run because, either: a. You didn't set BOOST_ROOT to indicate the root of your Boost installation. b. You are trying to use stock Jam but didn't indicate which compilation toolset to use. To do so, follow these simple instructions: - define one of the following environment variable, with the appropriate value according to this list: Variable Toolset Description BORLANDC Borland C++ BC++ install path VISUALC Microsoft Visual C++ VC++ install path VISUALC16 Microsoft Visual C++ 16 bit VC++ 16 bit install INTELC Intel C/C++ IC++ install path WATCOM Watcom C/C++ Watcom install path MINGW MinGW (gcc) MinGW install path LCC Win32-LCC LCC-Win32 install path - define the JAM_TOOLSET environment variable with the *name* of the toolset variable you want to use. e.g.: set VISUALC=C:\Visual6 set JAM_TOOLSET=VISUALC so I went into the jamfile and wrote this: set BOOST_ROOT = C:\Documents and Settings\Administrator\Desktop\boost_1_32_0 set VISUALC = C:\Program Files\Microsoft Visual Studio .NET 2003\Visual C++ .NET Standard 2003 - English set JAM_TOOLSET=VISUALC and tried again, but it gave me the same error. I don't know where to go to find what I'm doing wrong. Can anyone help? cheers
  17. lincsimp

    Boost jamfile problem

    Thank you!! :)
  18. lincsimp

    Boost jamfile problem

    can anyone help?
  19. lincsimp

    Free physics engines

    hi Does anyone know of any free physics engines available for use in commercial projects? cheers
  20. lincsimp

    What's extern "C"?

    thanks snk_kid!!
  21. Hey My prog has extern "C" in one of the libs. When I try to compile it I get: zlib/zlib.h:37: error: syntax error before string constant zlib/zlib.h:94: error: syntax error before "alloc_func" zlib/zlib.h:94: warning: no semicolon at end of struct or union zlib/zlib.h:101: error: syntax error before '}' token zlib/zlib.h:101: warning: data definition has no type or storage class zlib/zlib.h:103: error: syntax error before '*' token zlib/zlib.h:103: warning: data definition has no type or storage class zlib/zlib.h:217: error: syntax error before "strm" zlib/zlib.h:299: error: syntax error before "strm" zlib/zlib.h:334: error: syntax error before "strm" zlib/zlib.h:433: error: syntax error before "strm" zlib/zlib.h:507: error: syntax error before "strm" zlib/zlib.h:544: error: syntax error before "dest" zlib/zlib.h:562: error: syntax error before "strm" zlib/zlib.h:573: error: syntax error before "strm" zlib/zlib.h:594: error: syntax error before "strm" zlib/zlib.h:603: error: syntax error before "strm" zlib/zlib.h:662: error: syntax error before "strm" zlib/zlib.h:681: error: syntax error before "strm" zlib/zlib.h:696: error: syntax error before "dest" zlib/zlib.h:712: error: syntax error before "strm" zlib/zlib.h:747: error: syntax error before '*' token zlib/zlib.h:816: error: syntax error before '*' token zlib/zlib.h:1160: error: syntax error before "strm" zlib/zlib.h:1162: error: syntax error before "strm" zlib/zlib.h:1164: error: syntax error before "strm" zlib/zlib.h:1168: error: syntax error before "strm" zlib/zlib.h:1170: error: syntax error before '*' token zlib/zlib.h:1193: error: syntax error before "z" zlib/zlib.h:1197: error: syntax error before '}' token What am I doing wrong?? cheers
  22. lincsimp

    What's extern "C"?

    Thanks! I'm using mingw.. Why would it be cauing an error though? cheers
  23. lincsimp

    What's extern "C"?

    Thanks. It's part of zlib.h
  24. lincsimp

    Compiling ode

    Hey When I try to compile ODE with my engine I get errors strating: ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x1fac): undefined reference to `IceMaths::InvertPRMatrix(IceMaths::Matrix4x4&, IceMaths::Matrix4x4 const&)' ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x20c6): undefined reference to `Opcode::OBBCollider::Collide(Opcode::OBBCache&, IceMaths::OBB const&, Opcode::Model const&, IceMaths::Matrix4x4 const*, IceMaths::Matrix4x4 const*)' ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x21db): undefined reference to `IceCore::Container::~Container()' ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x28be): undefined reference to `Opcode::MeshInterface::VertexCache' ode/collision_trimesh_box.o:collision_trimesh_box.cpp:(.text+0x28c7): undefined reference to `Opcode::MeshInterface::VertexCache' I tend to be able to sort these probs out by now, but I can't think of any lib I've missed, could it be the build order? cheers
  25. Hi Does anyone know of a simple, preferably free, program to view which functions are declared in a lib, their parameters etc.? cheers
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!