49,761 Topics
| |
Can anyone help me convert this C# code to C code? with "character" is a string variable and "desired_output_bit" was defined. [CODE]int byteCount = unicode.GetByteCount(character.ToCharArray()); byte[] bytes = new Byte[byteCount]; bytes= unicode.GetBytes(character); BitArray bits = new BitArray( bytes ); System.Collections.IEnumerator bit_enumerator = bits.GetEnumerator(); int bit_array_length = bits.Length; bit_enumerator.Reset (); for(int … | |
hi...uh...again, I know I ask a lot of questions, but I'm really clueless. My HW says I have to write a function that accepts a pointer to a C-string as an argument and capitalizes that first character of each sentence in the string. I know the toupper function, but I … | |
Hi, where can I find written GUI tutorials for GUI Design in C++ besides Winprog.org's? I would like it to feature Windows.h and it is okay if it costs money to buy. | |
Hi, I am doing an undergraduate physics project by writing a C++ code to implement the Metropolis algorithm to a simple 2d one component plasma. In short, I have to determine the equilibrium configuration at each temperature by means of the Metropolis algorithm and then compute ensemble averages (such as … | |
Hi, I'm trying to use command line stuff with C++. I've read that you do it with System(); Is that the best way? My main question however, is how do you read in the results from the command? I think I can do 'thecommand > file' to output the results … | |
Hey peeps. I'm currently working on a level editor for my game. and the part im working on at the moment is like, the sprite editor for it, where you can load a bitmap from a preset directory 'Sprites' in the games directory, set the collision points and then use … | |
Hello all! I am having a bit of a problem with the grasps of Open CV and thought i may be able to request some of your help. Though I'm not completely sure that this is the right category. I have been playing around with openCV to try and provide … | |
Hi people, I'm trying to compile my C++ project under Windows, which it should be able to. I've got a whole bunch of dependency libraries. When I compile everything seems fine until these error pop up: [CODE]1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\rpc.h(27) : error C2598: linkage specification must be at global scope 1>C:\Program … | |
Hello everyone, i have a problem in my code. I want to make 2D vector with type char and the char read from a file, because i want to make it as dynamic array regarding the size of input can be different. Here is my file: bla.txt ------------------------------ K1, K2. … | |
I just created a code in c++ and i was wondering if there is any way a can convert that into a excel document. | |
how does the compiler, running program ? know how much memory to delete with the delete[] because if there is no reference to the size that the developer can access, is it the compiler that tell the delete[] operator how much to delete ? or is it within the running … | |
Hello I have a form where I have a lot of code perheps about 1000 pages. Now in an event I have 160 lines of this code that I show below. I am showing 2 lines to give an example here: [code] for(int i = 0; i < 6; i++ … | |
Is there any free C++ programme that I could use as Im trying to learn this? | |
Heyy daniweb! I have a couple questions that need answering :) 1. Is there a way, in C++ to do a do - if loop? 2. Can there be a way to do something like: [CODE]#include <iostream> int main() { if (g == string) // if something were to EQUAL … | |
Exercise 1: Introduce int variables x and y and int* pointer variables p and q. Set x to 2, y to 8, p to the addre ss of x, and q to the address of y. Then print the following information: (1) The address of x and the value of … | |
I know how to create a UDP socket and bind it to an ip/port and how to read a stream of data from the socket using recvfrom(), but how can I get the data of a single UDP packet at a time? For example if "data of one packet" was … | |
I have a csv file that has 12 columns. I've been using: [code=c++] while(!infile.eof()) { getline( infile, source, ',' ); outfile << source << ", "; getline( infile, native_ID, ',' ); outfile << native_ID << ", "; getline( infile, index, ',' ); outfile << index << ", "; getline( infile, … | |
Hi all, Im trying to read data that is send from my Arduino Duemilanove(Atmega328). Link to arduino: [URL="http://arduino.cc/en/Main/ArduinoBoardDuemilanove"]http://arduino.cc/en/Main/ArduinoBoardDuemilanove[/URL] My arduino sends a max of 24 chars. example 1: 32767*32767*32767*32767 Now if send 24 chars and read them in "UitBuff"(24 chars) the data is correct. However if i send less then … | |
Hi Everybody I wrote this program to experiment with dynamic binding. One class inherits from another which inherits from another. The user creates a new object of their choice at run time and 2 functions within that object should be called but it doesn't seem to be working out that … | |
Hi all again, I'm now in my 3rd week of my C++ course and I have a few little issues I need explained to me. The Hangman game in question is NOT supposed to be functional yet. It's an generic exercise in classes in which Hangman will be MY final … | |
1. an int and a class with only an int member, are they of the same size? 2. what is the size of a class containing 4 ints and a virtual function? | |
It was a question in an old exam : the expression if(num != 65)can not be replaced by....... and the answer is: if( !(num-65) ) but I can't understand this condition :( what is num-65, what does it mean? Thanks | |
Define a class Queue_time that represents a queue of Time objects (from our textbook) by keeping its elements in a dynamically allocated array (with maximum capacity) and make the queue as a "circular array" (the first element follows the last one). Supply the "big three" memory management functions. Use this … | |
So, I'm writing a roguelike game in C++. But, its complaining about a class I made called "Player" in the file "player.h" in the file "monster". When I input into monster this function: [CODE] void attackplayer(Player& hero, bool checkup, bool checkdown, bool checkleft, bool checkright) { if (checkup == true … | |
| Another new coder here, and yes, I am a student. I am NOT asking for a solution, but I am asking for guidance to point me in the right direction. I am supposed to write a code that receives input from the terminal as to the temperature in Fahrenheit and … |
hi, I have a problem with implementation of a quicksort algorithm. I have pseudo-code which helping me understand this, but I still can't make this program to work. Does anybody can help me figur out what is wrong in my code? Thanks My code : [CODE] #include <iostream> #include <ctime> … | |
Does anyone know if it is possible to open files for editing via ftp using Visual C++ 2010? Thanks, Remus | |
Hi i'm new to using c++ and i would like to ask if you could help me out. I have to somehow get a working c++ program that will allow me to convert any one, two or three digit positive integer into words using string/array method. Say, 111 will be … | |
How do i search all the lines in a richtextbox for a specific string in the line and then return the line number the string correspondents in. [edit]using Visual c++ windows form CLR |
The End.