Recent content by Linda8888
-
Comp Sci What is the Best Way to Use Namespaces in C++?
using namespace std; using vit = vector<string>::iterator; void print(const vector<string>& s) { for(vit it = s.begin(); it != s.end(); ++it ) { count << *it << endl; } }- Linda8888
- Thread
- C++
- Replies: 3
- Forum: Engineering and Comp Sci Homework Help
-
Question for strcpy and pointer
Summary:: Question: In the blank space below, write a new version of the first line of this code segment such that the strcpy succeeds. Use only stack memory and try not to waste memory. how can I change the first line of the code? char *s1; // change this line char *s2 = "good luck"...- Linda8888
- Thread
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
Question for a pointer code fragment
[SIZE=16px] Thanks for replying! Why are the first output 432 and the third 1024? How do those work?- Linda8888
- Post #3
- Forum: Programming and Computer Science
-
(C language)why does this code fail to compile
Thank you all. I got it!- Linda8888
- Post #8
- Forum: Programming and Computer Science
-
(C language)why does this code fail to compile
does main.c forgets to include <stdio.h>?- Linda8888
- Post #3
- Forum: Programming and Computer Science
-
Question for a pointer code fragment
(I am not sure what does "(MyType **)" means after the '=' sign at the second line) The output is :- Linda8888
- Thread
- Code
- Replies: 4
- Forum: Programming and Computer Science
-
(C language)why does this code fail to compile
// MyStruct.h typedef struct { int a; float b; char c; } MyStruct;// HisStruct.h #include "MyStruct.h" typedef struct { MyStruct a; int b; } HisStruct;// HerStruct.h #include "MyStruct.h" typedef struct { MyStruct a; float b; } HerStruct;// main.c #include "HisStruct.h" #include...- Linda8888
- Thread
- Code
- Replies: 7
- Forum: Programming and Computer Science