49,761 Topics

Member Avatar for
Member Avatar for whitelion_pc

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 …

0
55
Member Avatar for karen_CSE

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 …

Member Avatar for iamthwee
0
793
Member Avatar for Buolbear4444

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.

Member Avatar for sundas shoukat
0
83
Member Avatar for highflyer8

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 …

Member Avatar for jonsca
0
115
Member Avatar for randomFIRE

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 …

Member Avatar for iamthwee
0
277
Member Avatar for XAaronX

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 …

Member Avatar for XAaronX
0
81
Member Avatar for starkman

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 …

Member Avatar for megamanexp
0
231
Member Avatar for Excizted

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 …

Member Avatar for Excizted
0
907
Member Avatar for sasTReSS

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. …

Member Avatar for sasTReSS
0
199
Member Avatar for j-green.10

I just created a code in c++ and i was wondering if there is any way a can convert that into a excel document.

Member Avatar for iamthwee
0
77
Member Avatar for genux

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 …

Member Avatar for genux
0
91
Member Avatar for Jennifer84

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++ …

Member Avatar for Jennifer84
0
632
Member Avatar for Wakesta
Member Avatar for ctaylo21
0
92
Member Avatar for spartan118

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 …

Member Avatar for Radical Edward
0
111
Member Avatar for nouah

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 …

Member Avatar for daviddoria
-3
70
Member Avatar for TheWhite

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 …

0
71
Member Avatar for emmonssw

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, …

Member Avatar for emmonssw
0
132
Member Avatar for elexender

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 …

Member Avatar for elexender
0
88
Member Avatar for benji_k

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 …

Member Avatar for Fbody
0
131
Member Avatar for BLKelsey

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 …

Member Avatar for BLKelsey
0
74
Member Avatar for tennis

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?

Member Avatar for Radical Edward
0
138
Member Avatar for maleeha munawer
Member Avatar for Ayaat Monem

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

Member Avatar for Ancient Dragon
0
125
Member Avatar for n_angelov

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 …

Member Avatar for xuebao
0
1K
Member Avatar for Buolbear4444

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 …

Member Avatar for Buolbear4444
0
184
Member Avatar for Griff0527

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 …

Member Avatar for Griff0527
0
2K
Member Avatar for gfx

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> …

Member Avatar for griswolf
0
105
Member Avatar for remusac

Does anyone know if it is possible to open files for editing via ftp using Visual C++ 2010? Thanks, Remus

Member Avatar for Griff0527
0
83
Member Avatar for 7h3.doctorat3

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 …

Member Avatar for mrnutty
0
492
Member Avatar for Martje

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

Member Avatar for jonsca
0
817

The End.