Skip to content

Managed C++/CLI

Discussions on Managed Extensions for Visual C++ .NET

This category can be followed from the open social web via the handle managed-c-cli@forum.codeproject.com

4.4k Topics 14.9k Posts
  • Is every C# feature available in C++/Managed ?

    csharp c++ linq com tutorial
    3
    0 Votes
    3 Posts
    10 Views
    J
    Since Linq was designed as a C# language feature, many uses of it don't include a C++/CLI example in my experience. I have used it from C++/CLI however but it takes a bit of tinkering. Here's one example from a simple utility I had where I used ToList() which is probably similar to ToDictionary(). List^ files = Linq::Enumerable::ToList(Directory::EnumerateFiles(dataDir, "*.dat")); int count = Linq::Enumerable::Count(files); I've not yet encountered something managed which just could not be done from C++/CLI. But, the C# syntax is often more direct.
  • project $50 reward need in 24 hours

    c++ sales tutorial
    2
    0 Votes
    2 Posts
    6 Views
    P
    Rather than wasting the time of busy professionals, why not give this a try yourself? You might actually learn something (even if that something is that you only know how to start the program off and not how to finish it, showing you where you need to study more). This site is CodeProject, not RentACoder. This space for rent
  • ISSUE - TCP/IP sockets in MFC VS2017

    help c++ sysadmin
    3
    0 Votes
    3 Posts
    8 Views
    J
    I question how you are determining it is wrong. You code does not demonstrate that. HOWEVER.... You are declaring a data entity on the stack. Then you are RETURNING part of that data entity from the method. That is ALWAYS wrong. And I suspect that is your problem. The calling code also uses the stack. And will reuse exactly the same memory as where you are attempting to put a value if it wants to. For example if you are calling a method to 'print' the returned value in some way. Thus overwriting it. And that would cause a "junk" value either now or in the future.
  • 0 Votes
    3 Posts
    11 Views
    T
    solced it #include #include int largest(int num[], int count, int i, int max); int i=0; int main(){ int num[50], n, count, max, l, j, l_2; printf("Number of integers: \\t"); scanf("%d", &count); printf("\\nEnter your integers: \\n"); for(n=0; n
  • To find hcf of n number by using only loops.

    data-structures tutorial
    4
    0 Votes
    4 Posts
    9 Views
    L
    Yes, but this is your homework. Before you start coding try to write things out on paper and look at the best ways to get what you need. See how many things you can do in the first loop. For example, you can check each number to see if it is the smallest or largest as you read them in.
  • c++

    c++ help question
    2
    0 Votes
    2 Posts
    8 Views
    J
    Read the error message. It contains the source file name and line number where the error occured. If not, it is probably a linker error. Try to understand the error message. Read the documentation for the error message. Search the net for the error message. Compiler error: Inspect the reported line and the previous ones (some errors are sourced by invalid statements in previous lines but detected later). If you have multiple error messages, start with the first (subsequent errors may be sourced by previous ones). If you still not get it solved, ask here (or in other forums) providing the complete error message and related code. If necessary add additional information (e.g. about variables used by the code, used compiler, platform).
  • Get USB drive letter

    help c++ tutorial
    8
    0 Votes
    8 Posts
    22 Views
    U
    ok sir thank you.
  • singly linked list

    data-structures tutorial
    7
    0 Votes
    7 Posts
    15 Views
    U
    Big thanks for your reply.. :) :) :) :)
  • printing the customized data through printer in vc++ 6.0 dialog based.

    c++ help
    17
    0 Votes
    17 Posts
    38 Views
    L
    You need to use the Device Context GDI/GDI+ functions as described in Legacy Graphics (Windows)[^].
  • create c++ dll gui and call it on c#

    csharp c++
    4
    0 Votes
    4 Posts
    15 Views
    L
    It seems like i am in wrong place where no one in serious mood. I think its not a professional forum.
  • how to use crystal report in c++/clr ?

    c++ dotnet tutorial question
    3
    0 Votes
    3 Posts
    9 Views
    U
    I figured out, Visual CLR C++ with Crystal Report - YouTube[^]
  • how do I fix this

    help c++ question
    5
    0 Votes
    5 Posts
    14 Views
    U
    my english is poor ,so I want to help you ,but I can't tell you in english. we can learn together.
  • multithread

    data-structures tutorial question
    4
    0 Votes
    4 Posts
    11 Views
    M
    #define D define #D Y return #D R for #D e while #D I printf #D l int #D W if #D C y=v+111;H(x,v)*y++= *x #D H(a,b)R(a=b+11;au){R(w=i=0;i<4;i++)w+=(m=v[h[i]])==f?300:m==q?-300:(t=v[ih[i]])==f?-50: t==q?50:0;Y w;}H(z,0){W(E(v,z,f,100)){c++;w= -S(d+1,n,q,0,-b,-j);W(w>j){g=bz=z; j=w;W(w>=b||w>=8003)Y w;}}}W(!c){g=0;W(_){H(x,v)c+= *x==f?1:*x==3-f?-1:0;Y c>0? 8000+c:c-8000;}C;j= -S(d+1,n,q,1,-b,-j);}bz=g;Y d>=u-1?j+(c<<3):j;}main(){R(;t< 1600;t+=100)R(m=0;m<100;m++)V[t+m]=m<11||m>88||(m+1)%10<2?3:0;I("Level:");V[44] =V[55]=1;V[45]=V[54]=2;s(u);e(lv>0){Z do{I("You:");s(m);}e(!E(V,m,2,0)&&m!=99); W(m!=99)lv--;W(lv<15&&u<10)u+=2;U("Wait\n");I("Value:%d\n",S(0,V,1,0,-9000,9000 ));I("move: %d\n",(lv-=E(V,bz,1,0),bz));}}E(v,z,f,o)l*v;{l*j,q=3-f,g=0,i,w,*k=v +z;W(*k==0)R(i=7;i>=0;i--){j=k+(w=r[i]);e(*j==q)j+=w;W(*j==f&&j-w!=k){W(!g){g=1 ;C;}e(j!=k)*((j-=w)+o)=f;}}Y g;}
  • 0 Votes
    2 Posts
    2 Views
    Richard Andrew x64R
    Copy and paste? :| The difficult we do right away... ...the impossible takes slightly longer.
  • ChannelFactory create exception

    wpf wcf help question
    4
    0 Votes
    4 Posts
    11 Views
    L
    The error message is quite clear, so there must be a null parameter somewhere. It may well be inside the actual framework, caused by something not being built correctl. And the only way to find it is by going deep in the debugger.
  • VC++ solution Klocwork code analysis is getting stuck

    help csharp c++ visual-studio
    2
    0 Votes
    2 Posts
    6 Views
    J
    You may get better help in a product specific forum: Forums | Klocwork Developer Network[^].
  • c++ toolTip windowsforms graphics

    question c++ graphics
    4
    0 Votes
    4 Posts
    12 Views
    L
    Why not just use a method that works?
  • query

    database
    3
    0 Votes
    3 Posts
    7 Views
    P
    Member 12917984 wrote: can we use # sign at places other than with the header files The answer is YES, but the question do not really make sense. # is commonly used with conditional compilation #if, #elif, #else, and #endif. You should rather explain what you want to do with # Here is links to references books on C and C++ by the authors of the languages. Note than C is the ancestor of C++, so knowing C is always useful with C++. The C Programming Language - Wikipedia, the free encyclopedia[^] https://hassanolity.files.wordpress.com/2013/11/the_c_programming_language_2.pdf[^] http://www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf[^] C++ Programing Language[^] Patrice “Everything should be made as simple as possible, but no simpler.” Albert Einstein
  • String concatenation using operator overloading

    help question
    3
    0 Votes
    3 Posts
    8 Views
    K
    You must allocate some memory (and delete it after your done) for your sir member. String operator+ (String box) { String temp; temp.sir = new char[strlen(box.sir)]:///memory for the string strcpy (temp.sir, sir); strcat (temp.sir, box.sir); return temp; } I am a bit confused that your code isnt crashing. X| Press F1 for help or google it. Greetings from Germany
  • Using Electric Cloud Accelerator with C++/CLI code

    c++ hosting cloud question
    2
    0 Votes
    2 Posts
    6 Views
    A
    Almost every build automation tool supports the toolchains, or they provide tools to setup your own build tasks and set up your own binaries. Do they allow that? I don't have an account, so I cannot test that. The shit I complain about It's like there ain't a cloud in the sky and it's raining out - Eminem ~! Firewall !~